mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 23:16:03 +00:00
multi enum match any word prop
This commit is contained in:
@@ -321,7 +321,10 @@ define('views/fields/array', ['views/fields/base', 'lib!Selectize'], function (D
|
||||
highlight: false,
|
||||
searchField: ['label'],
|
||||
plugins: ['remove_button'],
|
||||
score: function (search) {
|
||||
};
|
||||
|
||||
if (!this.matchAnyWord) {
|
||||
selectizeOptions.score = function (search) {
|
||||
var score = this.getScoreFunction(search);
|
||||
search = search.toLowerCase();
|
||||
return function (item) {
|
||||
@@ -330,8 +333,8 @@ define('views/fields/array', ['views/fields/base', 'lib!Selectize'], function (D
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (this.allowCustomOptions) {
|
||||
selectizeOptions.persist = false;
|
||||
|
||||
@@ -38,6 +38,8 @@ define('views/fields/multi-enum', ['views/fields/array', 'lib!Selectize'], funct
|
||||
|
||||
editTemplate: 'fields/multi-enum/edit',
|
||||
|
||||
matchAnyWord: false,
|
||||
|
||||
events: {
|
||||
},
|
||||
|
||||
@@ -172,7 +174,10 @@ define('views/fields/multi-enum', ['views/fields/array', 'lib!Selectize'], funct
|
||||
searchField: ['label'],
|
||||
plugins: pluginList,
|
||||
copyClassesToDropdown: true,
|
||||
score: function (search) {
|
||||
};
|
||||
|
||||
if (!this.matchAnyWord) {
|
||||
selectizeOptions.score = function (search) {
|
||||
var score = this.getScoreFunction(search);
|
||||
search = search.toLowerCase();
|
||||
return function (item) {
|
||||
@@ -181,8 +186,8 @@ define('views/fields/multi-enum', ['views/fields/array', 'lib!Selectize'], funct
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (this.allowCustomOptions) {
|
||||
selectizeOptions.persist = false;
|
||||
|
||||
@@ -30,6 +30,8 @@ define('views/settings/fields/currency-list', 'views/fields/multi-enum', functio
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
matchAnyWord: true,
|
||||
|
||||
setupOptions: function () {
|
||||
this.params.options = this.getMetadata().get(['app', 'currency', 'list']) || [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user