aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-24 18:26:06 -0800
committerfriendica <info@friendica.com>2011-11-24 18:26:06 -0800
commit4b95e8ebe8719827566b484810dfe140f7b51726 (patch)
treeb25c15cc4422e2d47635e671113763c1bcdabaa1 /js/main.js
parent757ca5014cc6329b53d5a8f6e6b7a1a19952f0f2 (diff)
downloadvolse-hubzilla-4b95e8ebe8719827566b484810dfe140f7b51726.tar.gz
volse-hubzilla-4b95e8ebe8719827566b484810dfe140f7b51726.tar.bz2
volse-hubzilla-4b95e8ebe8719827566b484810dfe140f7b51726.zip
rework the liveupdate fixes - what a mess
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js38
1 files changed, 27 insertions, 11 deletions
diff --git a/js/main.js b/js/main.js
index 1a8cb4b85..f41071ca1 100644
--- a/js/main.js
+++ b/js/main.js
@@ -233,6 +233,9 @@
// $('#' + ident).hide();
// }
//});
+
+ // add a new thread
+
$('.tread-wrapper',data).each(function() {
var ident = $(this).attr('id');
if($('#' + ident).length == 0) {
@@ -241,22 +244,35 @@
});
$('#' + prev).after($(this));
}
+ prev = ident;
+ });
+
+ // reset vars for inserting individual items
+
+ prev = 'live-' + src;
+
+ $('.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'));
+ });
+ $('#' + prev).after($(this));
+ }
else {
- $(this).find('.wall-item-outside-wrapper').each(function() {
- var iident = $(this).attr('id');
- $('#' + iident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
- if($('#' + iident + ' ' + '.comment-edit-text-empty').length)
- $('#' + iident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
- $('#' + iident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
- $('#' + iident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like'));
- $('#' + iident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike'));
- $('#' + iident + ' ' + '.my-comment-photo').each(function() {
- $(this).attr('src',$(this).attr('dst'));
- });
+ $('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
+ if($('#' + ident + ' ' + '.comment-edit-text-empty').length)
+ $('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
+ $('#' + ident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
+ $('#' + 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'));
});
}
prev = ident;
});
+
$('.like-rotator').hide();
if(commentBusy) {
commentBusy = false;