summaryrefslogtreecommitdiff
path: root/ext/bg/js/search-query-parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/search-query-parser.js')
-rw-r--r--ext/bg/js/search-query-parser.js22
1 files changed, 17 insertions, 5 deletions
diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js
index 935f01f2..1c89583f 100644
--- a/ext/bg/js/search-query-parser.js
+++ b/ext/bg/js/search-query-parser.js
@@ -18,7 +18,7 @@
/* global
* QueryParserGenerator
* TextScanner
- * apiOptionsSet
+ * apiModifySettings
* apiTermsFind
* apiTextParse
* docSentenceExtract
@@ -72,8 +72,14 @@ class QueryParser extends TextScanner {
}
onParserChange(e) {
- const selectedParser = e.target.value;
- apiOptionsSet({parsing: {selectedParser}}, this.getOptionsContext());
+ const value = e.target.value;
+ apiModifySettings([{
+ action: 'set',
+ path: 'parsing.selectedParser',
+ value,
+ scope: 'profile',
+ optionsContext: this.getOptionsContext()
+ }], 'search');
}
getMouseEventListeners() {
@@ -92,8 +98,14 @@ class QueryParser extends TextScanner {
refreshSelectedParser() {
if (this.parseResults.length > 0) {
if (!this.getParseResult()) {
- const selectedParser = this.parseResults[0].id;
- apiOptionsSet({parsing: {selectedParser}}, this.getOptionsContext());
+ const value = this.parseResults[0].id;
+ apiModifySettings([{
+ action: 'set',
+ path: 'parsing.selectedParser',
+ value,
+ scope: 'profile',
+ optionsContext: this.getOptionsContext()
+ }], 'search');
}
}
}