aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/display-window.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-18 13:00:29 -0700
committerAlex Yatskov <alex@foosoft.net>2017-03-18 13:00:29 -0700
commit57697ee2a09dd5ad0a567b7104e4a5ac9a4f1b23 (patch)
tree9b67ed5633c598eea26e1a2afb686f79bd682fdf /ext/bg/js/display-window.js
parente782a4343251bb76c3b7d0bb4b788d7a6ac7756e (diff)
polish and initial command support
Diffstat (limited to 'ext/bg/js/display-window.js')
-rw-r--r--ext/bg/js/display-window.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/bg/js/display-window.js b/ext/bg/js/display-window.js
index ad193c5b..8c732ddd 100644
--- a/ext/bg/js/display-window.js
+++ b/ext/bg/js/display-window.js
@@ -20,8 +20,13 @@
window.displayWindow = new class extends Display {
constructor() {
super($('#spinner'), $('#content'));
- $('#search').click(this.onSearch.bind(this));
- window.wanakana.bind($('#query').get(0));
+
+ const search = $('#search');
+ search.click(this.onSearch.bind(this));
+
+ const query = $('#query');
+ query.on('input', () => search.prop('disabled', query.val().length === 0));
+ window.wanakana.bind(query.get(0));
}
definitionAdd(definition, mode) {