diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-19 17:30:38 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-19 17:30:38 -0700 |
commit | d5b4b0499842023fab57a8231d7e0eb80737deab (patch) | |
tree | 54470d711f4fd6cc25a0befeb6ff36e8aa28bb8e /ext/bg/js/settings.js | |
parent | 6a2e272f116c539ddd0fbf474509537d6b4529af (diff) | |
parent | becf549dcec03b1a5aff8ff9033fc7d14b8a2541 (diff) |
Merge branch 'master' into firefox-amo
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r-- | ext/bg/js/settings.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js index 7bdd9f84..b8cb4afe 100644 --- a/ext/bg/js/settings.js +++ b/ext/bg/js/settings.js @@ -331,11 +331,6 @@ function ankiFieldsToDict(selection) { async function ankiDeckAndModelPopulate(options) { const ankiFormat = $('#anki-format').hide(); - const ankiTermsModel = $('#anki-terms-model').val(options.anki.terms.model); - const ankiKanjiModel = $('#anki-kanji-model').val(options.anki.kanji.model); - - $('#anki-terms-deck').val(options.anki.terms.deck); - $('#anki-kanji-deck').val(options.anki.kanji.deck); const deckNames = await utilAnkiGetDeckNames(); const ankiDeck = $('.anki-deck'); @@ -347,8 +342,11 @@ async function ankiDeckAndModelPopulate(options) { ankiModel.find('option').remove(); modelNames.sort().forEach(name => ankiModel.append($('<option/>', {value: name, text: name}))); - await ankiFieldsPopulate(ankiTermsModel, options); - await ankiFieldsPopulate(ankiKanjiModel, options); + $('#anki-terms-deck').val(options.anki.terms.deck); + await ankiFieldsPopulate($('#anki-terms-model').val(options.anki.terms.model), options); + + $('#anki-kanji-deck').val(options.anki.kanji.deck); + await ankiFieldsPopulate($('#anki-kanji-model').val(options.anki.kanji.model), options); ankiFormat.show(); } |