summaryrefslogtreecommitdiff
path: root/plugins/Realtime/realtimeupdate.js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-09-23 21:58:35 +0000
committerSarven Capadisli <csarven@status.net>2009-09-23 21:58:35 +0000
commit4d4bb089a5e3addfd4be2f82e5e4e257070f4058 (patch)
tree21702f2ee34843a1b537f1ba9e64c19e2ece4e7f /plugins/Realtime/realtimeupdate.js
parentbdbc2cb8de370eef6d5d06412746f52797ea0458 (diff)
Created addPop() for Realtime plugin and added param to include iconurl
Diffstat (limited to 'plugins/Realtime/realtimeupdate.js')
-rw-r--r--plugins/Realtime/realtimeupdate.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 04e07956d..2910e4a80 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -111,9 +111,30 @@ RealtimeUpdate = {
return dl;
},
- addPopup: function(url, title)
+ addPopup: function(url, title, iconurl)
{
- // FIXME: need to add the realtime popup button here
+ $('#site_nav_local_views .current a').append('<button id="realtime_timeline" title="Real-time pop window">&#8599;</button>');
+
+ $('#realtime_timeline').css({
+ 'margin':'2px 0 0 11px',
+ 'background':'transparent url('+ iconurl + ') no-repeat 45% 45%',
+ 'text-indent':'-9999px',
+ 'width':'16px',
+ 'height':'16px',
+ 'padding':'0',
+ 'display':'block',
+ 'float':'right',
+ 'border':'none',
+ 'cursor':'pointer'
+ });
+
+ $('#realtime_timeline').click(function() {
+ window.open(url,
+ title,
+ 'toolbar=no,resizable=yes,scrollbars=yes,status=yes');
+
+ return false;
+ });
}
}