Browse Source

loading thingy

master
wes 9 years ago
parent
commit
a6f0e958f4
  1. 13
      src/scripts/search.tag

13
src/scripts/search.tag

@ -35,18 +35,18 @@
</div> </div>
</search> </search>
var showedHelp = false; this.showedHelp = false;
var waiting = false; this.waiting = false;
function showHelp() { function showHelp() {
if (!showedHelp) { if (!this.showedHelp) {
this.opts.showHelp = true; this.opts.showHelp = true;
this.update(); this.update();
if (!waiting) { if (!waiting) {
waiting = true; waiting = true;
window.setTimeout( window.setTimeout(
(function() { (function() {
waiting = false; this.waiting = false;
clearHelpTemp.bind(this)(); clearHelpTemp.bind(this)();
}).bind(this), 10000); }).bind(this), 10000);
} }
@ -54,7 +54,7 @@ function showHelp() {
} }
function clearHelp() { function clearHelp() {
showedHelp = true; this.showedHelp = true;
this.opts.showHelp = false; this.opts.showHelp = false;
this.update(); this.update();
} }
@ -65,8 +65,9 @@ function clearHelpTemp() {
} }
function submit(ev) { function submit(ev) {
clearHelp();
ev.preventDefault(); ev.preventDefault();
this.showedHelp = true;
this.opts.showHelp = false;
console.log("submitted"); console.log("submitted");
this.opts.booksLoading = true; this.opts.booksLoading = true;
this.update(); this.update();

Loading…
Cancel
Save