From 0a3e9ab41d3bc8bd8cb240f148e81b288ee109f8 Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 8 Aug 2016 17:26:18 -0400 Subject: [PATCH] loading thingy --- src/scripts/search.tag | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripts/search.tag b/src/scripts/search.tag index e556e3a..a2d0fa7 100644 --- a/src/scripts/search.tag +++ b/src/scripts/search.tag @@ -16,16 +16,21 @@ +
+
function submit(ev) { console.log("submitted"); + console.log(this); this.opts.booksLoading = true; this.update(); var params = $(ev.currentTarget).serialize(); $.getJSON("/search/fc?"+params, - function(courses) { + (function(courses) { var fcourses = filterCourses(courses); var cgroups = groupsof(3, fcourses); results_passer.trigger("new_results", cgroups); - }); + this.opts.booksLoading = false; + this.update(); + }).bind(this)); }