Browse Source

Backend : pouvoir désactiver un select2

master
Guillaume 4 years ago
parent
commit
5bd8196af2
1 changed files with 6 additions and 3 deletions
  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 View 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…
Cancel
Save