X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FRealtime%2Frealtimeupdate.js;h=a75f17d8c55930e946a54fb63d0fb4a6f3590261;hb=0799f48197c67dbbbd1b613f1fc9c66d9250f2ae;hp=4cd68a816b2bde0fc2d2a9cbeb424accd747a4fd;hpb=b3b3af9a2eff10c272bb213eccd3dd3060bc5830;p=quix0rs-gnu-social.git diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 4cd68a816b..a75f17d8c5 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -25,24 +25,27 @@ RealtimeUpdate = { 'border-top-color':'#AAAAAA', 'border-top-style':'solid' }); + + return false; }); }, receive: function(data) { - id = data.id; - - // Don't add it if it already exists - // - if ($("#notice-"+id).length > 0) { - return; - } - - var noticeItem = RealtimeUpdate.makeNoticeItem(data); - $("#notices_primary .notices").prepend(noticeItem); - $("#notices_primary .notice:first").css({display:"none"}); - $("#notices_primary .notice:first").fadeIn(1000); - NoticeReply(); + setTimeout(function() { + id = data.id; + + // Don't add it if it already exists + if ($("#notice-"+id).length > 0) { + return; + } + + var noticeItem = RealtimeUpdate.makeNoticeItem(data); + $("#notices_primary .notices").prepend(noticeItem); + $("#notices_primary .notice:first").css({display:"none"}); + $("#notices_primary .notice:first").fadeIn(1000); + NoticeReply(); + }, 500); }, makeNoticeItem: function(data) @@ -125,14 +128,17 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#content').prepend(''); + $('#notices_primary').css({'position':'relative'}); + $('#notices_primary').prepend(''); $('#realtime_timeline').css({ - 'margin':'0 0 18px 0', + 'margin':'0 0 11px 0', 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', 'padding':'0 0 0 20px', 'display':'block', - 'float':'right', + 'position':'absolute', + 'top':'-20px', + 'right':'0', 'border':'none', 'cursor':'pointer', 'color':$("a").css("color"),