Fix correct image count if there is no replies.

This commit is contained in:
Nicolas Stepien 2011-05-23 12:44:47 +02:00
parent cec02d0f92
commit 49de3385c0
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -1547,10 +1547,11 @@ reportButton =
threadStats =
init: ->
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount>1</span></div>"
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount></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
$('#icount').textContent = threadStats.images
g.callbacks.push threadStats.node
node: (root) ->
return if root.className