summaryrefslogtreecommitdiff
path: root/plugins/Realtime
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-09-23 22:02:42 +0000
committerSarven Capadisli <csarven@status.net>2009-09-23 22:02:42 +0000
commit1f12993a4ddad8eba29c604c55f6b82d08dc0127 (patch)
treede50bd3c22f78e438c2fd11a4748a050fe690b0e /plugins/Realtime
parentddb9518c9949989f99c3e7b0323c9bbd01c1d5ee (diff)
Added JavaScript to initialize the poped Window
Diffstat (limited to 'plugins/Realtime')
-rw-r--r--plugins/Realtime/RealtimePlugin.php13
-rw-r--r--plugins/Realtime/realtimeupdate.js7
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php
index f211c01f9..4fb8bf84e 100644
--- a/plugins/Realtime/RealtimePlugin.php
+++ b/plugins/Realtime/RealtimePlugin.php
@@ -99,15 +99,22 @@ class RealtimePlugin extends Plugin
$user_id = 0;
}
- $iconurl = $base.'plugins/Realtime/icon_external.gif';
+ // FIXME: Need to check if the current URL is a poped realtime window
+ if (1==2) {
+ $realtimeUI = ' RealtimeUpdate.initPopupWindow();';
+ }
+ else {
+ // FIXME: This icon URL is no good if fancy URLs are off.
+ $iconurl = $base.'plugins/Realtime/icon_external.gif';
+ $realtimeUI = ' RealtimeUpdate.addPopup("'.$url.'", "'.$title.'", "'. $iconurl .'");';
+ }
$action->elementStart('script', array('type' => 'text/javascript'));
$script = ' $(document).ready(function() { '.
$this->_updateInitialize($timeline, $user_id).
- ' RealtimeUpdate.addPopup("'.$url.'", "'.$title.'", "'. $iconurl .'");'
+ $realtimeUI.
'}); ';
-
$action->raw($script);
$action->elementEnd('script');
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 2910e4a80..4fda5079d 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -135,6 +135,13 @@ RealtimeUpdate = {
return false;
});
+ },
+
+ initPopupWindow: function()
+ {
+ window.resizeTo(575, 640);
+ $('address').hide();
+ $('#content').css({'width':'92%'});
}
}