Merge branch 'ticket/r12581-fix-soflexi'
This commit is contained in:
commit
40bcc889c3
@ -272,10 +272,12 @@ $(document).ready(function () {
|
||||
if (selected_carrier == bpr_id) {
|
||||
$('[id^="PR"].BPR, [id^="PR"].BDP, [id^="PR"].CDI, [id^="PR"].ACP').show();
|
||||
selector_supper_selector.find('option[value="choixPoste"]').attr('selected', true);
|
||||
refreshSelect(selector_supper_selector);
|
||||
}
|
||||
else if (selected_carrier == a2p_id) {
|
||||
$('[id^="PR"].A2P, [id^="PR"].CMT, [id^="PR"].PCS').show();
|
||||
selector_supper_selector.find('option[value="choixCom"]').attr('selected', true);
|
||||
refreshSelect(selector_supper_selector);
|
||||
}
|
||||
|
||||
$('#soflexibilite_overlay').fadeIn('fast', function () {
|
||||
|
@ -146,9 +146,6 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.layer_cart_overlay, #order #layer_cart .cross, #order #layer_cart .continue', function() {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
// search tâches
|
||||
if(typeof tags != 'undefined') {
|
||||
@ -548,6 +545,29 @@ function customSelect(el)
|
||||
$container.append($label, $valueList).addClass('custom-select');
|
||||
}
|
||||
|
||||
function refreshSelect(el)
|
||||
{
|
||||
// Génération
|
||||
$options = el.children('option');
|
||||
$defaultValue = el.find('option:selected').length ? el.children('option:selected').html() : $options[0].html();
|
||||
$container = el.parent();
|
||||
el.hasClass('disabled') ? $container.addClass('disabled') : $container.removeClass('disabled');
|
||||
|
||||
$label = el.next('span').html($defaultValue);
|
||||
$valueList = el.siblings('ul').html('');
|
||||
|
||||
el.hasClass('small') ? $valueList.addClass('small') : '';
|
||||
if(el.hasClass('search')) {
|
||||
$valueList.append($(document.createElement('li')).addClass('search-input').html($(document.createElement('input'))));
|
||||
}
|
||||
|
||||
$options.each(function(idx, option) {
|
||||
$valueList.append($(document.createElement('li')).attr('data-value', $(option).val()).html($(option).html()));
|
||||
});
|
||||
|
||||
customInputsEventsManager();
|
||||
}
|
||||
|
||||
function customCheckbox(el)
|
||||
{
|
||||
// Génération
|
||||
|
Loading…
Reference in New Issue
Block a user