From 30999c13d32e7f111db16814dc2cbb0f30825861 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 4 Mar 2017 18:24:57 -0800 Subject: wip --- ext/mixed/js/display.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mixed') 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)); } -- cgit v1.2.3