aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-29 12:33:16 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-29 12:33:16 -0400
commite18b8438ae369e84367fbb635a2e11506519a88a (patch)
treef768e2efa33a8aaef828a2c4646be843522f70db /ext/bg/js/settings.js
parent888075d21ab099a2dcbe69df756682fabdea47e1 (diff)
Updated button styles
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r--ext/bg/js/settings.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index 3f107785..c85cc8a4 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -151,6 +151,7 @@ async function formWrite(options) {
function formSetupEventListeners() {
$('#dict-purge-link').click(utilAsync(onDictionaryPurge));
$('#dict-file').change(utilAsync(onDictionaryImport));
+ $('#dict-file-button').click(onDictionaryImportButtonClick);
$('#field-templates-reset').click(utilAsync(onAnkiFieldTemplatesReset));
$('input, select, textarea').not('.anki-model').not('.profile-form *').change(utilAsync(onFormOptionsChanged));
@@ -448,6 +449,11 @@ async function onDictionaryPurge(e) {
}
}
+function onDictionaryImportButtonClick() {
+ const dictFile = document.querySelector('#dict-file');
+ dictFile.click();
+}
+
async function onDictionaryImport(e) {
const dictFile = $('#dict-file');
const dictControls = $('#dict-importer').hide();