From fa4ed0f3b1ce5decfc6ee59d38e63e78a7793de4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 22 Dec 2017 07:11:26 +0100 Subject: new keyword form --- public/assets/js/lib/views/index/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'public/assets/js/lib/views/index/index.js') diff --git a/public/assets/js/lib/views/index/index.js b/public/assets/js/lib/views/index/index.js index 94bc57d..3f217fc 100644 --- a/public/assets/js/lib/views/index/index.js +++ b/public/assets/js/lib/views/index/index.js @@ -2,18 +2,19 @@ var IndexView = View.extend({ events: { }, - + action: "/api/index", keywordAction: "/api/keyword/", - + initialize: function(opt){ // opt.parent = parent this.hootbox = new HootBox ({ parent: this }) this.threadbox = new ThreadBox ({ parent: this }) this.lastlog = new LastLog ({ parent: this }) }, - + load: function(keyword){ + $("body").addClass("index") if (keyword) { $(".subtitle").html('< Home · Keywords') this.threadbox.options.latest = false @@ -25,10 +26,9 @@ var IndexView = View.extend({ this.threadbox.options.latest = true this.threadbox.options.welcome = true $.get(this.action, this.populate.bind(this)) - $("body").addClass("index") } }, - + populate: function(data){ $("body").removeClass('loading') this.hootbox.load(data.hootbox) @@ -36,9 +36,9 @@ var IndexView = View.extend({ this.lastlog.load(data.lastlog) $(".search_form input").focus() }, - + success: function(){ window.location.href = "/index" }, -}) \ No newline at end of file +}) -- cgit v1.2.3-70-g09d2