Quellcode durchsuchen

Merge branch 'develop'

develop
Guillaume vor 3 Jahren
Ursprung
Commit
87d24640ae
2 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen
  1. +3
    -2
      Resources/assets/app/adminlte/main/init.js
  2. +7
    -3
      Resources/assets/functions/widgets.js

+ 3
- 2
Resources/assets/app/adminlte/main/init.js Datei anzeigen

@@ -1,8 +1,9 @@
window.addEventListener('load', (event) => {

$(document).on('select2:open', () => {
// @TODO : cela met le focus sur le premier select2 du document
/*$(document).on('select2:open', () => {
document.querySelector('.select2-search__field').focus();
});
});*/

SovNotification.init();


+ 7
- 3
Resources/assets/functions/widgets.js Datei anzeigen

@@ -18,9 +18,13 @@ export class SovWidgets {
if ($select.data('width')) {
options.width = 'auto'
}
if ($select.find('option[value=""]')) {

// @TODO : génère une erreur
/*if ($select.find('option[value=""]')) {
options.placeholder = $select.find('option[value=""]').html()
}
}*/

options.placeholder = "";

var myselect = $select.select2(options);

@@ -28,11 +32,11 @@ export class SovWidgets {
var event = new Event('change');
e.target.dispatchEvent(event);
});

myselect.on('select2:unselect', function (e) {
var event = new Event('change');
e.target.dispatchEvent(event);
});
SovTools.log(myselect);

myselect.off('select2:open')


Laden…
Abbrechen
Speichern