disable storing text filters param

This commit is contained in:
Yuri Kuznetsov
2023-05-03 11:40:58 +03:00
parent 1d00350fa1
commit 3e94e18b73
4 changed files with 19 additions and 2 deletions
@@ -32,7 +32,8 @@
"followCreatedEntityTypeList": "Auto-follow created records of specific entity types",
"emailUseExternalClient": "Use an external email client",
"scopeColorsDisabled": "Disable scope colors",
"tabColorsDisabled": "Disable tab colors"
"tabColorsDisabled": "Disable tab colors",
"textSearchStoringDisabled": "Disable storing text filters"
},
"links": {
},
@@ -46,7 +46,9 @@
}
],
[
false,
{
"name": "textSearchStoringDisabled"
},
{
"name": "followCreatedEntityTypeList"
}
@@ -187,6 +187,10 @@
"tabColorsDisabled": {
"type": "bool",
"default": false
},
"textSearchStoringDisabled": {
"type": "bool",
"default": false
}
},
"noDeletedAttribute": true,
+10
View File
@@ -102,6 +102,8 @@ define('views/record/search', ['view', 'helpers/misc/stored-text-search'], funct
*/
this.storedTextSearchHelper = new StoredTextSearch(this.scope, this.getHelper().storage);
this.textSearchStoringDisabled = this.getPreferences().get('textSearchStoringDisabled');
this.textFilterDisabled = this.options.textFilterDisabled || this.textFilterDisabled ||
this.getMetadata().get(['clientDefs', this.scope, 'textFilterDisabled']);
@@ -695,6 +697,10 @@ define('views/record/search', ['view', 'helpers/misc/stored-text-search'], funct
},
initTextSearchAutocomplete: function () {
if (this.textSearchStoringDisabled) {
return;
}
let preventCloseOnBlur = false;
let options = {
@@ -1297,6 +1303,10 @@ define('views/record/search', ['view', 'helpers/misc/stored-text-search'], funct
return;
}
if (this.textSearchStoringDisabled) {
return;
}
this.storedTextSearchHelper.store(this.textFilter);
},
});