aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-02 16:37:33 -0700
committerfriendica <info@friendica.com>2013-07-02 16:37:33 -0700
commitda05b9736ec0f2712d1a6828ff819aa12dd9e391 (patch)
treed4abb67a4e0280ea86a29310f0e1d1423ab369f3 /js/main.js
parentb86253c655f974920c4d3de0915611a7e66c7336 (diff)
downloadvolse-hubzilla-da05b9736ec0f2712d1a6828ff819aa12dd9e391.tar.gz
volse-hubzilla-da05b9736ec0f2712d1a6828ff819aa12dd9e391.tar.bz2
volse-hubzilla-da05b9736ec0f2712d1a6828ff819aa12dd9e391.zip
some work on issue #62 (comments collapsing on liveupdate), but still a work in progress
some work on photo consolidated "view/edit", but still a work in progress
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js37
1 files changed, 23 insertions, 14 deletions
diff --git a/js/main.js b/js/main.js
index 8b1114d19..c8c3ea48d 100644
--- a/js/main.js
+++ b/js/main.js
@@ -355,14 +355,22 @@ 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;
-// });
+
+ // FIXME this doesn't work at all to prevent open comments from
+ // collapsing on update - but I'm leaving this experimental code here until
+ // I have time to dig into it again. Ideally we want to find
+ // the expanded comments div on the page and then expand the one we received
+ // over the wire (in the data variable) before placing the thread on the page,
+ // as then it won't blink.
+
+ expanded_comments = false;
+ $('.collapsed-comments',this).each(function() {
+ if($('.thread-wrapper',this).is(':visible'))
+ expanded_comments = this;
+ });
$('#' + prev).after($(this));
-// if(expanded_comments)
-// $(expanded_comments).show();
+ if(expanded_comments)
+ $(expanded_comments).show();
$(".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 +382,15 @@ 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
+ expanded_comments = false;
+ $('.collapsed-comments',this).each(function() {
+ if($('.thread-wrapper',this).is(':visible'))
+ expanded_comments = $(this);
+ });
$('#' + ident).replaceWith($(this));
-// if(expanded_comments)
-// $(expanded_comments).show();
+ if(expanded_comments)
+ $(expanded_comments).show();
$(".autotime").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });