WIP
This commit is contained in:
parent
a9fb566884
commit
8ad217970f
@ -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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user