diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-03-31 18:17:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 18:17:28 -0400 |
commit | bcbd413e571d772a4438f57138169ad1a6a3b5a8 (patch) | |
tree | e8768f5e91e62759e2dce7179359aa83ff6e4d0f /ext/js/pages/settings/dictionary-import-controller.js | |
parent | cbcfdcacaf68efb09e47932f5b14881b982aecd2 (diff) |
Definition collapsing when overflowing (#1575)
* Add double-down-chevron.svg
* Add options
* Update dictionary importers
* Update settings
* Add support for collapsible definitions
* Improve case when there is a very small amount of overflow
* Fix incorrect enabled state of newly imported dictionaries
Diffstat (limited to 'ext/js/pages/settings/dictionary-import-controller.js')
-rw-r--r-- | ext/js/pages/settings/dictionary-import-controller.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index ce724263..afa45899 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -16,6 +16,7 @@ */ /* global + * DictionaryController * DictionaryDatabase * DictionaryImporter * ObjectPropertyAccessor @@ -212,7 +213,7 @@ class DictionaryImportController { const profileCount = optionsFull.profiles.length; for (let i = 0; i < profileCount; ++i) { const {options} = optionsFull.profiles[i]; - const value = this._createDictionaryOptions(); + const value = DictionaryController.createDefaultDictionarySettings(true); const path1 = ObjectPropertyAccessor.getPathString(['profiles', i, 'options', 'dictionaries', title]); targets.push({action: 'set', path: path1, value}); @@ -291,14 +292,6 @@ class DictionaryImportController { }); } - _createDictionaryOptions() { - return { - priority: 0, - enabled: true, - allowSecondarySearches: false - }; - } - _errorToString(error) { error = (typeof error.toString === 'function' ? error.toString() : `${error}`); |