aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/dictionary-import-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-11 17:31:58 -0400
committerGitHub <noreply@github.com>2020-10-11 17:31:58 -0400
commit5b5b45b88efdd625e5d117c8317bee5bf047b4ff (patch)
tree7eed13abe8a2c8379105b13ed698c8b75e580df1 /ext/bg/js/settings/dictionary-import-controller.js
parenta8601ec95cc22bbfcff45d213585f4c90555a5e1 (diff)
Dictionary controller refactor (#912)
* Support multiple main dictionary selects * Update progress container * Change class name * Simplify dictionary info * Update outdated node visibility * Simplify node usage * Simplify title * Update classes * Update IDs/classes * Remove details container visibility assignment * Use a template for dictionary details * Fix progress bar visibility * Fix incorrect property * Rename dict-details to dictionary-details * Remove unused classes * Update class names for dictionary templates * Rename templates * More id renaming * Remove unused id * Rename more IDs
Diffstat (limited to 'ext/bg/js/settings/dictionary-import-controller.js')
-rw-r--r--ext/bg/js/settings/dictionary-import-controller.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/bg/js/settings/dictionary-import-controller.js b/ext/bg/js/settings/dictionary-import-controller.js
index 2c954ef8..e0ee0ee3 100644
--- a/ext/bg/js/settings/dictionary-import-controller.js
+++ b/ext/bg/js/settings/dictionary-import-controller.js
@@ -51,17 +51,17 @@ class DictionaryImportController {
}
async prepare() {
- this._purgeButton = document.querySelector('#dict-purge-button');
- this._purgeConfirmButton = document.querySelector('#dict-purge-confirm');
- this._importFileButton = document.querySelector('#dict-file-button');
- this._importFileInput = document.querySelector('#dict-file');
- this._purgeConfirmModal = this._modalController.getModal('dict-purge-modal');
- this._errorContainer = document.querySelector('#dict-error');
- this._spinner = document.querySelector('#dict-spinner');
- this._progressContainer = document.querySelector('#dict-import-progress');
+ this._purgeButton = document.querySelector('#dictionary-delete-all-button');
+ this._purgeConfirmButton = document.querySelector('#dictionary-confirm-delete-all-button');
+ this._importFileButton = document.querySelector('#dictionary-import-file-button');
+ this._importFileInput = document.querySelector('#dictionary-import-file-input');
+ this._purgeConfirmModal = this._modalController.getModal('dictionary-confirm-delete-all');
+ this._errorContainer = document.querySelector('#dictionary-error');
+ this._spinner = document.querySelector('#dictionary-spinner');
+ this._progressContainer = document.querySelector('#dictionary-import-progress-container');
this._progressBar = this._progressContainer.querySelector('.progress-bar');
- this._purgeNotification = document.querySelector('#dict-purge');
- this._importInfo = document.querySelector('#dict-import-info');
+ this._purgeNotification = document.querySelector('#dictionary-delete-all-status');
+ this._importInfo = document.querySelector('#dictionary-import-info');
this._purgeButton.addEventListener('click', this._onPurgeButtonClick.bind(this), false);
this._purgeConfirmButton.addEventListener('click', this._onPurgeConfirmButtonClick.bind(this), false);
@@ -301,7 +301,7 @@ class DictionaryImportController {
_setButtonsEnabled(value) {
value = !value;
- for (const node of document.querySelectorAll('.dictionary-modifying-input')) {
+ for (const node of document.querySelectorAll('.dictionary-database-mutating-input')) {
node.disabled = value;
}
}