]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.8.x' into 0.9.x
authorSarven Capadisli <csarven@status.net>
Mon, 28 Sep 2009 17:55:09 +0000 (17:55 +0000)
committerSarven Capadisli <csarven@status.net>
Mon, 28 Sep 2009 17:55:09 +0000 (17:55 +0000)
plugins/PiwikAnalyticsPlugin.php
plugins/Realtime/RealtimePlugin.php
plugins/Realtime/realtimeupdate.js
theme/base/css/display.css

index 8191f518112dd3092f2f3f77c0924c714dd04ff3..54faa0bdbefee085216495efbef62a1e825dcf33 100644 (file)
@@ -38,22 +38,16 @@ if (!defined('STATUSNET')) {
  * This plugin will spoot out the correct JavaScript spell to invoke
  * Piwik Analytics on a page.
  *
- * To use this plugin please add the following three lines to your config.php
+ * To use this plugin add the following to your config.php
  *
- *     require_once('plugins/PiwikAnalyticsPlugin.php');
- *     $pa = new PiwikAnalyticsPlugin("example.com/piwik/","id");
+ *  addPlugin('PiwikAnalytics', array('piwikroot' => 'example.com/piwik/',
+ *                                    'piwikId' => 'id'));
  *
- * exchange example.com/piwik/ with the url to your piwik installation and
- * make sure you don't forget the final /
- * exchange id with the ID your statusnet installation has in your Piwik analytics
+ * Replace 'example.com/piwik/' with the URL to your Piwik installation and
+ * make sure you don't forget the final /.
+ * Replace 'id' with the ID your statusnet installation has in your Piwik
+ * analytics setup - for example '8'.
  *
- * @category Plugin
- * @package  StatusNet
- * @author   Tobias Diekershoff <tobias.diekershoff@gmx.net>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://status.net/
- *
- * @see      Event
  */
 
 class PiwikAnalyticsPlugin extends Plugin
index e30c4115676b3740205af9caec39936a7b1c03eb..0f0d0f9f42309b134298220d3fc1d148e3ae2ed7 100644 (file)
@@ -216,8 +216,6 @@ class RealtimePlugin extends Plugin
                                                               'class' => 'user_in')
                               : array('id' => $action->trimmed('action')));
 
-        $action->elementStart('div', array('id' => 'header'));
-
         // XXX hack to deal with JS that tries to get the
         // root url from page output
 
@@ -230,7 +228,6 @@ class RealtimePlugin extends Plugin
         if (common_logged_in()) {
             $action->showNoticeForm();
         }
-        $action->elementEnd('div');
 
         $action->showContentBlock();
         $action->elementEnd('body');
index 57fe0a843651ebf1d29b28a492623c297aa82a45..4cd68a816b2bde0fc2d2a9cbeb424accd747a4fd 100644 (file)
@@ -14,6 +14,18 @@ RealtimeUpdate = {
         RealtimeUpdate._replyurl = replyurl;
         RealtimeUpdate._favorurl = favorurl;
         RealtimeUpdate._deleteurl = deleteurl;
+
+        $(window).blur(function() {
+          $('#notices_primary .notice').css({
+            'border-top-color':$('#notices_primary .notice:last').css('border-top-color'),
+            'border-top-style':'dotted'
+          });
+
+          $('#notices_primary .notice:first').css({
+            'border-top-color':'#AAAAAA',
+            'border-top-style':'solid'
+          });
+        });
      },
 
      receive: function(data)
@@ -27,7 +39,7 @@ RealtimeUpdate = {
           }
 
           var noticeItem = RealtimeUpdate.makeNoticeItem(data);
-          $("#notices_primary .notices").prepend(noticeItem, true);
+          $("#notices_primary .notices").prepend(noticeItem);
           $("#notices_primary .notice:first").css({display:"none"});
           $("#notices_primary .notice:first").fadeIn(1000);
           NoticeReply();
@@ -113,35 +125,52 @@ RealtimeUpdate = {
 
      addPopup: function(url, timeline, iconurl)
      {
-         $('#site_nav_local_views .current a').append('<button id="realtime_timeline" title="Real-time pop window">&#8599;</button>');
+         $('#content').prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</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',
+             'margin':'0 0 18px 0',
+             'background':'transparent url('+ iconurl + ') no-repeat 0% 30%',
+             'padding':'0 0 0 20px',
              'display':'block',
              'float':'right',
              'border':'none',
-             'cursor':'pointer'
+             'cursor':'pointer',
+             'color':$("a").css("color"),
+             'font-weight':'bold',
+             'font-size':'1em'
          });
+
          $('#realtime_timeline').click(function() {
              window.open(url,
                          timeline,
                          'toolbar=no,resizable=yes,scrollbars=yes,status=yes');
+
              return false;
          });
      },
 
      initPopupWindow: function()
      {
-         window.resizeTo(575, 640);
+         window.resizeTo(500, 550);
          $('address').hide();
-         $('#content').css({'width':'92%'});
+         $('#content').css({'width':'93.5%'});
+
+         $('#form_notice').css({
+            'margin':'18px 0 18px 1.795%',
+            'width':'93%',
+            'max-width':'451px'
+         });
+
+         $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'});
+
+         $('.notices li:first-child').css({'border-top-color':'transparent'});
+
+         $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'});
+
+         $('#form_notice #notice_data-attach').css({
+            'left':'auto',
+            'right':'0'
+         });
      }
 }
 
index 1f37a7637bc8e69ab5fc3ce4a0caad5ab119a0c1..7706fba4845b58ab59daeec51e070eb58d296d7f 100644 (file)
@@ -484,7 +484,7 @@ height:16px;
 #form_notice .form_note {
 position:absolute;
 bottom:2px;
-right:98px;
+right:21.715%;
 z-index:9;
 }
 #form_notice .form_note dt {