mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:50:11 +00:00
rework the liveupdate fixes - what a mess
This commit is contained in:
parent
757ca5014c
commit
4b95e8ebe8
2 changed files with 29 additions and 13 deletions
38
js/main.js
38
js/main.js
|
@ -233,7 +233,25 @@
|
|||
// $('#' + ident).hide();
|
||||
// }
|
||||
//});
|
||||
|
||||
// add a new thread
|
||||
|
||||
$('.tread-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));
|
||||
}
|
||||
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() {
|
||||
|
@ -242,21 +260,19 @@
|
|||
$('#' + 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue