Browse Source

Merge branch 'develop'

develop
Fab 2 years ago
parent
commit
b901d9eb84
2 changed files with 13 additions and 11 deletions
  1. +1
    -1
      Definition/Field/AbstractFieldDefinition.php
  2. +12
    -10
      Resources/assets/functions/widgets.js

+ 1
- 1
Definition/Field/AbstractFieldDefinition.php View File

$fieldArray = []; $fieldArray = [];
foreach($configureFieldArray as $fieldName) { foreach($configureFieldArray as $fieldName) {
if(isset($allFieldArray[$fieldName])) { if(isset($allFieldArray[$fieldName])) {
$fieldArray[] = $allFieldArray[$fieldName];
$fieldArray[$fieldName] = $allFieldArray[$fieldName];
} }
else { else {
throw new \ErrorException('Le field "'.$fieldName.'" n\'est pas défini dans configureFields()'); throw new \ErrorException('Le field "'.$fieldName.'" n\'est pas défini dans configureFields()');

+ 12
- 10
Resources/assets/functions/widgets.js View File

static setAutoCompleteField() { static setAutoCompleteField() {
var autocompleteFields = $('[data-lc-autocomplete-url]'); var autocompleteFields = $('[data-lc-autocomplete-url]');
autocompleteFields.each(function () { autocompleteFields.each(function () {
var $this = $(this),
url = $this.data('lc-autocomplete-url');

$this.autoComplete({
//bootstrapVersion: 4,
//noResultsText: 'Aucun résultat n\'a été trouvé.',
resolverSettings: {
url: url
}
});
if(!$(this).hasClass('autocomplete-disabled')) {
var $this = $(this),
url = $this.data('lc-autocomplete-url');

$this.autoComplete({
//bootstrapVersion: 4,
//noResultsText: 'Aucun résultat n\'a été trouvé.',
resolverSettings: {
url: url
}
});
}
}); });
} }



Loading…
Cancel
Save