This commit is contained in:
Alex Yatskov 2016-11-13 19:22:11 -08:00
parent a9fb566884
commit 8ad217970f
2 changed files with 11 additions and 1 deletions

View File

@ -313,6 +313,12 @@ function populateDictionaries(opts) {
} }
function onPurgeDb() { function onPurgeDb() {
const dictControls = $('#dict-importer, #dict-groups');
dictControls.hide();
const dictProgress = $('.dict-purge-progress');
dictProgress.show();
const dictError = $('#dict-error'); const dictError = $('#dict-error');
dictError.hide(); dictError.hide();
@ -323,6 +329,8 @@ function onPurgeDb() {
dictError.show().find('span').text(error); dictError.show().find('span').text(error);
}).then(() => { }).then(() => {
dictSpinner.hide(); dictSpinner.hide();
dictProgress.hide();
dictControls.show();
return loadOptions().then(opts => populateDictionaries(opts)); return loadOptions().then(opts => populateDictionaries(opts));
}); });
} }

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="../lib/bootstrap-3.3.6-dist/css/bootstrap-theme.min.css"> <link rel="stylesheet" type="text/css" href="../lib/bootstrap-3.3.6-dist/css/bootstrap-theme.min.css">
<style> <style>
#anki-spinner, #anki-general, #anki-error, #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 { #options-advanced {
display: none; display: none;
} }
@ -77,6 +77,8 @@
wait for import and delete operations to complete before closing this page. wait for import and delete operations to complete before closing this page.
</p> </p>
<div class="dict-purge-progress">Dictionary data is being purged, please be patient...</div>
<div id="dict-groups"></div> <div id="dict-groups"></div>
<div class="alert alert-warning" id="dict-warning"> <div class="alert alert-warning" id="dict-warning">