From c5ac0eb8d5f5ad17331ce2058ec88f6172cfac7a Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Thu, 18 Sep 2014 17:47:57 +0900 Subject: [PATCH] Enable basic keyword validation --- client/application.js | 7 ++++++- client/index.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/application.js b/client/application.js index 5244c06..218f65e 100644 --- a/client/application.js +++ b/client/application.js @@ -115,10 +115,15 @@ } $('#search').click(onSearch); + $('#learn').click(onLearn); + $('#keyword').bind('input', function() { + $('#learn').prop('disabled', !$(this).val()); + }); + $('#keywords').selectpicker('refresh'); $('#keywords').change(function() { - $('#search').prop('disabled', $(this).val() === null); + $('#search').prop('disabled', !$(this).val()); }); }); } diff --git a/client/index.html b/client/index.html index 412f02b..c2e012c 100644 --- a/client/index.html +++ b/client/index.html @@ -91,7 +91,7 @@