diff options
author | Sarven Capadisli <csarven@status.net> | 2009-10-01 10:03:59 +0200 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2009-10-01 10:03:59 +0200 |
commit | b5d9d0562ad9da2fbed37e61ab792faa0ba4e7b0 (patch) | |
tree | 7bf3f89b9e576a8fdfc5c2c111be7e5e7a0fe250 /plugins/Realtime/realtimeupdate.js | |
parent | d37be603ca42bcd5c9867f011987b2e2c3993e64 (diff) | |
parent | c5be2962ad6fa4f78a4892005bc6a342de89c5d0 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/Realtime/realtimeupdate.js')
-rw-r--r-- | plugins/Realtime/realtimeupdate.js | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 4cd68a816..11e466325 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -30,19 +30,20 @@ RealtimeUpdate = { 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 +126,17 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#content').prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>'); + $('#notices_primary').css({'position':'relative'}); + $('#notices_primary').prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>'); $('#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"), |