From ebac7f79d32c524de750adc3bcf1cc539625d552 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 7 Sep 2015 14:04:18 -0400 Subject: split up partials and stub in mailbox frontend --- public/assets/js/lib/views/details/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'public/assets/js/lib/views/details/index.js') diff --git a/public/assets/js/lib/views/details/index.js b/public/assets/js/lib/views/details/index.js index d7fb26f..554c475 100644 --- a/public/assets/js/lib/views/details/index.js +++ b/public/assets/js/lib/views/details/index.js @@ -4,11 +4,13 @@ var DetailsView = View.extend({ }, action: "/api/thread/", + keywordAction: "/api/keyword/", initialize: function(opt){ this.comments = new CommentsView ({ parent: this }) this.files = new FilesView ({ parent: this }) this.gallery = new GalleryView ({ parent: this }) + this.threadbox = new ThreadBox ({ parent: this }) }, load: function(id){ @@ -21,6 +23,13 @@ var DetailsView = View.extend({ this.comments.load(data.comments) this.files.load(data.files) this.gallery.load(data.files) + if (data.thread.keyword) { + $.get(this.keywordAction + data.thread.keyword, this.populateKeyword.bind(this)) + } + }, + + populateKeyword: function(data){ + this.threadbox.load(data) }, success: function(){ -- cgit v1.2.3-70-g09d2