summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-04 18:24:57 -0800
committerAlex Yatskov <alex@foosoft.net>2017-03-04 18:24:57 -0800
commit30999c13d32e7f111db16814dc2cbb0f30825861 (patch)
tree3aa24f7045f10237aa744651844d18219d1890e6 /ext/mixed
parentb039d300249087aee18c7e8565ae7447d2cf5b15 (diff)
wip
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 26d50862..c2382d43 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -67,13 +67,13 @@ class Display {
this.textRender('terms.html', params).then(content => {
this.container.html(content);
$('.action-add-note').click(this.onActionAddNote.bind(this));
- $('.kanji-link').click(this.onKanjiSearch.bind(this));
$('.action-play-audio').click(this.onActionPlayAudio.bind(this));
+ $('.kanji-link').click(e => this.onKanjiSearch(e, options));
return this.adderButtonsUpdate(['term_kanji', 'term_kana'], sequence);
}).catch(this.handleError.bind(this));
}
- showKanjiDefs({definitions, options, context}) {
+ showKanjiDefs(definitions, options, context) {
const sequence = ++this.sequence;
const params = {
definitions,
@@ -122,11 +122,11 @@ class Display {
});
}
- onKanjiSearch(e) {
+ onKanjiSearch(e, options) {
e.preventDefault();
const character = $(e.target).text();
this.kanjiFind(character).then(definitions => {
- this.api_showKanjiDefs({definitions, options, context});
+ this.showKanjiDefs(definitions, options, context);
}).catch(this.handleError.bind(this));
}