diff options
author | Friendika <info@friendika.com> | 2011-03-29 18:20:52 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-03-29 18:20:52 -0700 |
commit | 8f547283c07483123901ae41c9f70881113cb35d (patch) | |
tree | 585e16c630bf3d84f900c2df514f5ed67f8f172b /include | |
parent | a41b4c6e6726b1158a8d05f37c1630d67e462fe5 (diff) | |
download | volse-hubzilla-8f547283c07483123901ae41c9f70881113cb35d.tar.gz volse-hubzilla-8f547283c07483123901ae41c9f70881113cb35d.tar.bz2 volse-hubzilla-8f547283c07483123901ae41c9f70881113cb35d.zip |
update comment count as new comments come in
Diffstat (limited to 'include')
-rw-r--r-- | include/main.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/main.js b/include/main.js index 824f2dfdf..750cce74c 100644 --- a/include/main.js +++ b/include/main.js @@ -113,12 +113,18 @@ $.get(update_url,function(data) { in_progress = false; + $('.ccollapse-wrapper',data).each(function() { + var ident = $(this).attr('id'); + if($('#' + ident).length) { + $('#' + ident).replaceWith($(this)); + } + }); $('.wall-item-outside-wrapper',data).each(function() { var ident = $(this).attr('id'); if($('#' + ident).length == 0) { - $('img',this).each(function() { - $(this).attr('src',$(this).attr('dst')); - }); + $('img',this).each(function() { + $(this).attr('src',$(this).attr('dst')); + }); $('#' + prev).after($(this)); } else { @@ -127,11 +133,9 @@ $('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper')); $('#' + ident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like')); $('#' + ident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike')); - $('#' + ident + ' ' + '.my-comment-photo').each(function() { - $(this).attr('src',$(this).attr('dst')); - }); - - + $('#' + ident + ' ' + '.my-comment-photo').each(function() { + $(this).attr('src',$(this).attr('dst')); + }); } prev = ident; }); |