diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-22 07:11:26 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-22 07:11:26 +0100 |
| commit | fa4ed0f3b1ce5decfc6ee59d38e63e78a7793de4 (patch) | |
| tree | 74658c754cbdff432aa8dc8b4f3521c993993c45 /public/assets/js/lib/views/index/index.js | |
| parent | 1a67f6f262364ee4fed0c1538ef2f41d772bf1b1 (diff) | |
new keyword form
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 +}) |
