summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-11-13 19:22:11 -0800
committerAlex Yatskov <alex@foosoft.net>2016-11-13 19:22:11 -0800
commit8ad217970f3b0c66c7020d30593cc0c61e1129e9 (patch)
treed2b62f71abedec346d386e8f17b6073fa39da82e
parenta9fb56688434164e30f8f94868c652be7e7d69ad (diff)
WIP
-rw-r--r--ext/bg/js/options-form.js8
-rw-r--r--ext/bg/options.html4
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 68a18d8f..d1e6fa18 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -313,6 +313,12 @@ function populateDictionaries(opts) {
}
function onPurgeDb() {
+ const dictControls = $('#dict-importer, #dict-groups');
+ dictControls.hide();
+
+ const dictProgress = $('.dict-purge-progress');
+ dictProgress.show();
+
const dictError = $('#dict-error');
dictError.hide();
@@ -323,6 +329,8 @@ function onPurgeDb() {
dictError.show().find('span').text(error);
}).then(() => {
dictSpinner.hide();
+ dictProgress.hide();
+ dictControls.show();
return loadOptions().then(opts => populateDictionaries(opts));
});
}
diff --git a/ext/bg/options.html b/ext/bg/options.html
index c3450c39..5b6301c6 100644
--- a/ext/bg/options.html
+++ b/ext/bg/options.html
@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="../lib/bootstrap-3.3.6-dist/css/bootstrap-theme.min.css">
<style>
#anki-spinner, #anki-general, #anki-error,
- #dict-spinner, #dict-error, #dict-warning, .dict-import-progress, .dict-delete-progress,
+ #dict-spinner, #dict-error, #dict-warning, .dict-purge-progress, .dict-import-progress, .dict-delete-progress,
#options-advanced {
display: none;
}
@@ -77,6 +77,8 @@
wait for import and delete operations to complete before closing this page.
</p>
+ <div class="dict-purge-progress">Dictionary data is being purged, please be patient...</div>
+
<div id="dict-groups"></div>
<div class="alert alert-warning" id="dict-warning">