se
This commit is contained in:
parent
7c4252d92f
commit
17c0e5901d
|
|
@ -47477,10 +47477,9 @@ function chargerFichiersTable() {
|
|||
return;
|
||||
}
|
||||
|
||||
// 1. On bloque les interactions sur le select pendant le chargement
|
||||
$select.prop('disabled', true);
|
||||
// On peut aussi ajouter une opacité légère sur le bouton pour le feedback
|
||||
$('.bootstrap-select').css('opacity', '0.7');
|
||||
// --- FIX ANTI-ACCUMULATION ---
|
||||
// On récupère le texte propre AVANT l'AJAX
|
||||
const selectedText = $select.find('option:selected').text().trim();
|
||||
|
||||
const loadingHtml = `<div class="text-center p-3"><div class="spinner-border spinner-border-sm text-primary"></div></div>`;
|
||||
$('#div_lister_table').html(loadingHtml);
|
||||
|
|
@ -47495,18 +47494,17 @@ function chargerFichiersTable() {
|
|||
$('#div_fichiers_table').html(data);
|
||||
afficheDonneesTableChoisie($('#fichier_lister').val());
|
||||
|
||||
// 2. RÉALIGNEMENT TOTAL SANS SCINTILLEMENT
|
||||
// On débloque l'élément
|
||||
$select.prop('disabled', false);
|
||||
$('.bootstrap-select').css('opacity', '1');
|
||||
|
||||
// On demande au plugin de se synchroniser avec la valeur réelle du select
|
||||
// sans déclencher d'événements "change" circulaires
|
||||
// --- CORRECTION NEUTRAL PRO ---
|
||||
// 1. On rafraîchit le picker pour l'état interne
|
||||
$select.selectpicker('refresh');
|
||||
|
||||
// 2. On FORCE le texte du bouton à redevenir unique
|
||||
// On cible précisément la div interne de rendu de Bootstrap-Select
|
||||
$('.bootstrap-select .filter-option-inner-inner').each(function() {
|
||||
$(this).text(selectedText);
|
||||
});
|
||||
},
|
||||
error: function(xhr) {
|
||||
$select.prop('disabled', false);
|
||||
$('.bootstrap-select').css('opacity', '1');
|
||||
toastr.error((codeLangue === "en_US") ? "Error..." : "Erreur...");
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user