diff options
Diffstat (limited to 'public/assets/js/lib/views/details/index.js')
| -rw-r--r-- | public/assets/js/lib/views/details/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
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(){ |
