diff options
Diffstat (limited to 'public/assets/js/lib/views/index/index.js')
| -rw-r--r-- | public/assets/js/lib/views/index/index.js | 14 |
1 files changed, 7 insertions, 7 deletions
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('<a href="/">< Home</a> · <a href="/keywords">Keywords</a>') 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 +}) |
