]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added JavaScript to initialize the poped Window
authorSarven Capadisli <csarven@status.net>
Wed, 23 Sep 2009 22:02:42 +0000 (22:02 +0000)
committerSarven Capadisli <csarven@status.net>
Wed, 23 Sep 2009 22:02:42 +0000 (22:02 +0000)
plugins/Realtime/RealtimePlugin.php
plugins/Realtime/realtimeupdate.js

index f211c01f94c828d0909c354494d716c4ee68e7c8..4fb8bf84e5e55adac63eaf352c45e40606014a18 100644 (file)
@@ -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');
index 2910e4a802162a3f358403b86613e0b1815022a8..4fda5079d42684c51313b00834da38dbf928dfda 100644 (file)
@@ -135,6 +135,13 @@ RealtimeUpdate = {
  
              return false;
          });
+     },
+
+     initPopupWindow: function()
+     {
+         window.resizeTo(575, 640);
+         $('address').hide();
+         $('#content').css({'width':'92%'});
      }
 }