From 1619616c523a14c903b66da6c9d8baada0166c06 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 9 Nov 2014 13:19:45 +0900 Subject: [PATCH] Changing reset behavior --- client/html/index.html | 1 - client/scripts/application.js | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/html/index.html b/client/html/index.html index ed00aa1..806c75a 100644 --- a/client/html/index.html +++ b/client/html/index.html @@ -21,7 +21,6 @@ Visualizer
-
diff --git a/client/scripts/application.js b/client/scripts/application.js index 4909d56..a162baa 100644 --- a/client/scripts/application.js +++ b/client/scripts/application.js @@ -65,10 +65,16 @@ $('#historyIndex').on('slideStop', onSelectSnapshot); $('#learn').click(onLearn); $('#forget').click(onForget); - $('#reset').click(onSearch); + $('#customized').click(onReset); }); } + function onReset() { + if (confirm('Reset customizations?')) { + onSearch(); + } + } + function onLearn() { var keyword = prompt('Input keyword to learn as (alphanumeric, no spaces)'); if (keyword === null) { @@ -181,12 +187,10 @@ function setCustomized(customized) { if (customized) { $('#customized').show(); - $('#reset').show(); $('#forget').hide(); } else { $('#customized').hide(); - $('#reset').hide(); $('#forget').show(); } }