Browse Source

loading thingy

master
wes 9 years ago
parent
commit
c82d13ace3
  1. 10
      src/scripts/search.tag

10
src/scripts/search.tag

@ -20,26 +20,26 @@
</div> </div>
</div> </div>
</form> </form>
<div if={ showHelp } <div if={ opts.showHelp }
class="help-toast toast toast-primary"> class="help-toast toast toast-primary">
<button onclick={clearHelp} <button onclick={clearHelp}
class="btn btn-clear float-right"> class="btn btn-clear float-right">
</button> </button>
Type a few words of your course's name or the course code (e.g. PSYCH 2B03) Type a few words of your course's name or the course code (e.g. PSYCH 2B03)
</div> </div>
<div if={ booksLoading } class="search-load"> <div if={ opts.booksLoading } class="search-load">
</div> </div>
</search> </search>
function clearHelp() { function clearHelp() {
this.showHelp = false; this.opts.showHelp = false;
this.update(); this.update();
} }
function submit(ev) { function submit(ev) {
ev.preventDefault(); ev.preventDefault();
console.log("submitted"); console.log("submitted");
this.booksLoading = true; this.opts.booksLoading = true;
this.update(); this.update();
results_passer.trigger("loading"); results_passer.trigger("loading");
var params = $(ev.currentTarget).serialize(); var params = $(ev.currentTarget).serialize();
@ -48,7 +48,7 @@ function submit(ev) {
var fcourses = filterCourses(courses); var fcourses = filterCourses(courses);
var cgroups = groupsof(3, fcourses); var cgroups = groupsof(3, fcourses);
results_passer.trigger("new_results", cgroups); results_passer.trigger("new_results", cgroups);
this.booksLoading = false; this.opts.booksLoading = false;
this.update(); this.update();
}).bind(this)); }).bind(this));
} }

Loading…
Cancel
Save