From a6f0e958f47e23c86faa374d40fe7f54055a2fbb Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 8 Aug 2016 20:31:03 -0400 Subject: [PATCH] loading thingy --- src/scripts/search.tag | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/scripts/search.tag b/src/scripts/search.tag index 580f238..88d0476 100644 --- a/src/scripts/search.tag +++ b/src/scripts/search.tag @@ -35,18 +35,18 @@ -var showedHelp = false; -var waiting = false; +this.showedHelp = false; +this.waiting = false; function showHelp() { - if (!showedHelp) { + if (!this.showedHelp) { this.opts.showHelp = true; this.update(); if (!waiting) { waiting = true; window.setTimeout( (function() { - waiting = false; + this.waiting = false; clearHelpTemp.bind(this)(); }).bind(this), 10000); } @@ -54,7 +54,7 @@ function showHelp() { } function clearHelp() { - showedHelp = true; + this.showedHelp = true; this.opts.showHelp = false; this.update(); } @@ -65,8 +65,9 @@ function clearHelpTemp() { } function submit(ev) { - clearHelp(); ev.preventDefault(); + this.showedHelp = true; + this.opts.showHelp = false; console.log("submitted"); this.opts.booksLoading = true; this.update();