diff options
author | Thomas Willingham <founder@kakste.com> | 2013-07-03 16:10:58 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-07-03 16:10:58 +0100 |
commit | d065135d909bf876f4c305d303de7642657f7e3e (patch) | |
tree | c569ec28535fe5e91ab29dffe67c9a74f11fece2 /js/main.js | |
parent | d1cae2da2abc3a602f682114bc02cce08a7e7578 (diff) | |
parent | 429ebabfd98240fe7d69ba81879ee35769af305f (diff) | |
download | volse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.tar.gz volse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.tar.bz2 volse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'js/main.js')
-rw-r--r-- | js/main.js | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/js/main.js b/js/main.js index 8b1114d19..161068310 100644 --- a/js/main.js +++ b/js/main.js @@ -343,26 +343,26 @@ function updateConvItems(mode,data) { - var expanded_comments = false; - if(mode === 'update') { prev = 'threads-begin'; + $('.thread-wrapper.toplevel_item',data).each(function() { + var ident = $(this).attr('id'); + var commentWrap = $('#'+ident+' .collapsed-comments').attr('id'); + var itmId = commentWrap.replace('collapsed-comments-',''); + var isVisible = false; if($('#' + ident).length == 0 && profile_page == 1) { $('img',this).each(function() { $(this).attr('src',$(this).attr('dst')); }); -// expanded_comments = false; -// $('.collapsed-comments',this).each(function() { -// if($(this).is(':visible')) -// expanded_comments = this; -// }); + if($('#collapsed-comments-'+itmId).is(':visible')) + isVisible = true; $('#' + prev).after($(this)); -// if(expanded_comments) -// $(expanded_comments).show(); + if(isVisible) + showHideComments(itmId); $(".autotime").timeago(); // divgrow doesn't prevent itself from attaching a second (or 500th) // "show more" div to a content region - it also has a few other @@ -374,14 +374,12 @@ function updateConvItems(mode,data) { $('img',this).each(function() { $(this).attr('src',$(this).attr('dst')); }); -// expanded_comments = false; -// $('.collapsed-comments',this).each(function() { -// if($(this).is(':visible')) -// expanded_comments = this; -// }); + // more FIXME related to expanded comments + if($('#collapsed-comments-'+itmId).is(':visible')) + isVisible = true; $('#' + ident).replaceWith($(this)); -// if(expanded_comments) -// $(expanded_comments).show(); + if(isVisible) + showHideComments(itmId); $(".autotime").timeago(); // $("div.wall-item-body").divgrow({ initialHeight: 400 }); |