Merge pull request #125 from MayhemYDG/master

Fix correct image count if there is no replies.
This commit is contained in:
James Campos 2011-05-23 07:21:41 -07:00
commit 0e62204120
2 changed files with 5 additions and 5 deletions

View File

@ -1971,13 +1971,13 @@
threadStats = {
init: function() {
var html;
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount>1</span></div>";
threadStats.replies = 0;
threadStats.images = $('.op img[md5]') ? 1 : 0;
html = "<div class=move>Replies: <span id=rcount>" + threadStats.replies + "</span> Images: <span id=icount>" + threadStats.images + "</span></div>";
$.append(d.body, ui.dialog('stats', {
bottom: '0px',
left: '0px'
}, html));
threadStats.replies = 0;
threadStats.images = $('.op img[md5]') ? 1 : 0;
return g.callbacks.push(threadStats.node);
},
node: function(root) {

View File

@ -1547,10 +1547,10 @@ reportButton =
threadStats =
init: ->
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount>1</span></div>"
$.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html)
threadStats.replies = 0
threadStats.images = if $ '.op img[md5]' then 1 else 0
html = "<div class=move>Replies: <span id=rcount>#{threadStats.replies}</span> Images: <span id=icount>#{threadStats.images}</span></div>"
$.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html)
g.callbacks.push threadStats.node
node: (root) ->
return if root.className