diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-01-11 13:55:55 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-01-11 13:55:55 +0100 |
| commit | b3ba48a22ce966e62cfad1671e4ee6f4357bb69f (patch) | |
| tree | 4c670b51c4f43ebf6f857b5999c2bc0f3f0e807c /public/assets/js/lib/views/index/threadbox.js | |
| parent | 2e9e542bfb81c3aff407801e3ae3f08eee0fb3d9 (diff) | |
move file api, debug flag on url to show ids
Diffstat (limited to 'public/assets/js/lib/views/index/threadbox.js')
| -rw-r--r-- | public/assets/js/lib/views/index/threadbox.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/public/assets/js/lib/views/index/threadbox.js b/public/assets/js/lib/views/index/threadbox.js index 70dc961..01d1de4 100644 --- a/public/assets/js/lib/views/index/threadbox.js +++ b/public/assets/js/lib/views/index/threadbox.js @@ -75,7 +75,16 @@ var ThreadBox = View.extend({ .replace(/{{show_files}}/g, thread.file_count == 0 ? "hidden" : "") .replace(/{{size_class}}/g, size[0] ) .replace(/{{color}}/g, thread.color || "blue" ) - return t + var $t = $(t) + if (app.debug) { + var $title = $t.find('.title a') + var href = $title.attr('href') + $title.attr('href', href + '?debug') + } + if (app.debug) { + $t.find('.date').append(' #' + thread.id) + } + return $t }, parseKeyword: function(keyword){ @@ -85,7 +94,7 @@ var ThreadBox = View.extend({ }, prependThread: function(thread){ - var $row = $( this.parse(thread) ) + var $row = this.parse(thread) this.$el.prepend($row) }, @@ -99,7 +108,7 @@ var ThreadBox = View.extend({ appendThread: function(thread){ thread.appended = true - var $row = $( this.parse(thread) ) + var $row = this.parse(thread) if (thread.first) $row.addClass('first') if (thread.last) $row.addClass('last') this.$el.append($row) |
