From 4c775f12ff6eda48fc22bec9ed336e60c1a0e07e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 11 Dec 2017 04:25:19 +0100 Subject: cssssssss --- public/assets/js/lib/views/index/index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 840f150..5acfe8b 100644 --- a/public/assets/js/lib/views/index/index.js +++ b/public/assets/js/lib/views/index/index.js @@ -4,17 +4,24 @@ var IndexView = View.extend({ }, action: "/api/index", + keywordAction: "/api/keyword/", initialize: function(opt){ // opt.parent = parent this.hootbox = new HootBox ({ parent: this }) this.threadbox = new ThreadBox ({ parent: this, latest: true, welcome: true, }) this.lastlog = new LastLog ({ parent: this }) - this.load() }, - load: function(){ - $.get(this.action, this.populate.bind(this)) + load: function(keyword){ + if (keyword) { + $(".subtitle").html('< Home') + this.threadbox.options.welcome = false + $.get(this.keywordAction + keyword, this.populate.bind(this)) + } + else { + $.get(this.action, this.populate.bind(this)) + } }, populate: function(data){ -- cgit v1.2.3-70-g09d2