aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options-form.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options-form.js')
-rw-r--r--ext/bg/js/options-form.js33
1 files changed, 1 insertions, 32 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 1f64f8d0..501848ad 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -141,7 +141,6 @@ function populateDictionaries(opts) {
});
$('.dict-enable-terms, .dict-enable.kanji').change(onOptionsChanged);
- $('.dict-delete').click(onDictionaryDelete);
}).catch(error => {
dictError.show().find('span').text(error);
}).then(() => {
@@ -149,36 +148,6 @@ function populateDictionaries(opts) {
});
}
-function onDictionaryDelete() {
- const dictGroup = $(this).closest('.dict-group');
-
- const dictError = $('#dict-error');
- dictError.hide();
-
- const dictSpinner = $('#dict-spinner');
- dictSpinner.show();
-
- const dictProgress = dictGroup.find('.dict-delete-progress');
- dictProgress.show();
-
- const dictControls = dictGroup.find('.dict-controls');
- dictControls.hide();
-
- const callback = (total, current) => {
- dictProgress.find('div').css('width', `${current / total * 100.0}%`);
- };
-
- database().deleteDictionary(dictGroup.data('title'), callback).then(() => {
- dictGroup.slideUp();
- }).catch(error => {
- dictError.show().find('span').text(error);
- }).then(() => {
- dictSpinner.hide();
- dictProgress.hide();
- dictControls.show();
- });
-}
-
function onDictionaryImport() {
const dictImport = $(this);
dictImport.prop('disabled', true);
@@ -186,7 +155,7 @@ function onDictionaryImport() {
const dictError = $('#dict-error');
dictError.hide();
- const dictProgress = $('.dict-import-progress');
+ const dictProgress = $('.dict-progress');
dictProgress.show();
const dictSpinner = $('#dict-spinner');