Sfoglia il codice sorgente

Backend : pouvoir désactiver un select2

master
Guillaume 4 anni fa
parent
commit
5bd8196af2
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. +6
    -3
      ShopBundle/Resources/public/js/backend/script/default/init-common.js

+ 6
- 3
ShopBundle/Resources/public/js/backend/script/default/init-common.js Vedi File

@@ -45,14 +45,17 @@ function initAdminLtePlugin() {
checkForm()
})


if ($('.select2, select.form-control').length) {
$('form .form-widget>select.form-control, .select2').each(function (i, elm) {
setSelect2($(elm))
if(!$(this).hasClass('disable-select2')) {
setSelect2($(elm)) ;
}
});

$('form .form-inline>select.form-control').each(function (i, elm) {
setSelect2($(elm))
if(!$(this).hasClass('disable-select2')) {
setSelect2($(elm)) ;
}
});
}


Loading…
Annulla
Salva