git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 1f12993a authored by Sarven Capadisli's avatar Sarven Capadisli

Added JavaScript to initialize the poped Window

parent ddb9518c
......@@ -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');
......
......@@ -135,6 +135,13 @@ RealtimeUpdate = {
return false;
});
},
initPopupWindow: function()
{
window.resizeTo(575, 640);
$('address').hide();
$('#content').css({'width':'92%'});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment