diff options
author | friendica <info@friendica.com> | 2015-01-06 11:37:48 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-06 11:37:48 -0800 |
commit | 11ec8d865c2482b9d57ee6432db8da1b3f58a270 (patch) | |
tree | 0e285d6c85ae800a236d2d014ecaac938023c549 /view/js/main.js | |
parent | b8d3936e473011298bf58d28db5c95c489f5836f (diff) | |
parent | c3433bdf9572946f3bb2a3e19b46d2e7f3da30d1 (diff) | |
download | volse-hubzilla-11ec8d865c2482b9d57ee6432db8da1b3f58a270.tar.gz volse-hubzilla-11ec8d865c2482b9d57ee6432db8da1b3f58a270.tar.bz2 volse-hubzilla-11ec8d865c2482b9d57ee6432db8da1b3f58a270.zip |
Merge branch 'mainjsoptimize' of git://github.com/pafcu/red into pafcu-mainjsoptimize
Conflicts:
view/js/main.js
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js index 1bfbaa0e7..974f5f971 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -135,11 +135,13 @@ function showHideComments(id) { if( $('#collapsed-comments-' + id).is(':visible')) { + $('#collapsed-comments-' + id + ' .autotime').timeago('dispose'); $('#collapsed-comments-' + id).slideUp(); $('#hide-comments-' + id).html(aStr['showmore']); $('#hide-comments-total-' + id).show(); } else { + $('#collapsed-comments-' + id + ' .autotime').timeago(); $('#collapsed-comments-' + id).slideDown(); $('#hide-comments-' + id).html(aStr['showfewer']); $('#hide-comments-total-' + id).hide(); @@ -452,6 +454,7 @@ function updateConvItems(mode,data) { $('.thread-wrapper.toplevel_item',data).each(function() { var ident = $(this).attr('id'); + // This should probably use the context argument instead var commentWrap = $('#'+ident+' .collapsed-comments').attr('id'); var itmId = 0; var isVisible = false; @@ -468,7 +471,7 @@ function updateConvItems(mode,data) { $('#' + prev).after($(this)); if(isVisible) showHideComments(itmId); - $(".autotime",this).timeago(); + $("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago(); } else { $('img',this).each(function() { @@ -479,7 +482,7 @@ function updateConvItems(mode,data) { $('#' + ident).replaceWith($(this)); if(isVisible) showHideComments(itmId); - $(".autotime",this).timeago(); + $("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago(); } prev = ident; }); @@ -510,7 +513,7 @@ function updateConvItems(mode,data) { $('#threads-end').before($(this)); if(isVisible) showHideComments(itmId); - $(".autotime",this).timeago(); + $("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago(); } else { $('img',this).each(function() { @@ -521,7 +524,7 @@ function updateConvItems(mode,data) { $('#' + ident).replaceWith($(this)); if(isVisible) showHideComments(itmId); - $(".autotime",this).timeago(); + $("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago(); } }); @@ -555,7 +558,7 @@ function updateConvItems(mode,data) { $('#' + prev).after($(this)); if(isVisible) showHideComments(itmId); - $(".autotime",this).timeago(); + $("> .wall-item-outside-wrapper .autotime, > .thread-wrapper .autotime",this).timeago(); } prev = ident; @@ -598,7 +601,11 @@ function updateConvItems(mode,data) { $(".wall-item-body, .contact-info").each(function() { if($(this).height() > divmore_height + 10) { if(! $(this).hasClass('divmore')) { - $(this).readmore({collapsedHeight: divmore_height, moreLink: '<a href="#" class="divgrow-showmore">'+aStr['divgrowmore']+'</a>', lessLink: '<a href="#">'+aStr['divgrowless']+'</a>'}); + $(this).readmore({ + collapsedHeight: divmore_height, + moreLink: '<a href="#" class="divgrow-showmore">'+aStr['divgrowmore']+'</a>', + lessLink: '<a href="#">'+aStr['divgrowless']+'</a>' + }); $(this).addClass('divmore'); } } |