r102108 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102107‎ | r102108 | r102109 >
Date:17:10, 5 November 2011
Author:petrb
Status:deferred
Tags:
Comment:
Support for mono
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBarMono.css (added) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php
@@ -17,7 +17,7 @@
1818 $wgExtensionCredits[version_compare( $wgVersion, '1.17', '>=' ) ? 'userpage tools' : 'other'][] = array(
1919 'path' => __FILE__,
2020 'name' => 'Online status bar',
21 - 'version' => '1.0.1',
 21+ 'version' => '1.0.2',
2222 'author' => array( 'Petr Bena' ),
2323 'descriptionmsg' => 'onlinestatusbar-desc',
2424 'url' => 'http://www.mediawiki.org/wiki/Extension:OnlineStatusBar',
@@ -32,6 +32,12 @@
3333 'remoteExtPath' => 'OnlineStatusBar',
3434 );
3535
 36+$wgResourceModules['ext.OnlineStatusBar.mono'] = array (
 37+ 'styles' => 'OnlineStatusBarMono.css',
 38+ 'localBasePath' => dirname ( __FILE__ ),
 39+ 'remoteExtPath' => 'OnlineStatusBar',
 40+);
 41+
3642 $wgAutoloadClasses['OnlineStatusBar'] = "$dir/OnlineStatusBar.body.php";
3743 $wgAutoloadClasses['OnlineStatusBarHooks'] = "$dir/OnlineStatusBarHooks.php";
3844
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php
@@ -134,7 +134,13 @@
135135 * @return bool
136136 */
137137 public static function stylePage( &$out, &$skin ) {
138 - $out->addModules( 'ext.OnlineStatusBar' );
 138+ switch ($skin->getSkinName()) {
 139+ case "monobook":
 140+ $out->addModules( 'ext.OnlineStatusBar.mono' );
 141+ break;
 142+ default:
 143+ $out->addModules( 'ext.OnlineStatusBar' );
 144+ }
139145 return true;
140146 }
141147
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarMono.css
@@ -0,0 +1,24 @@
 2+/*
 3+This is a part of css used on english wp, it's needed for wikis
 4+where topicon isn't defined
 5+*/
 6+div.onlinestatusbartop {
 7+ position: absolute;
 8+ z-index: 10;
 9+ top: 10px;
 10+ display: block !important;
 11+}
 12+
 13+div.onlinestatusbaricon {
 14+ border: 0px solid black;
 15+ background: transparent;
 16+ float: right;
 17+ position: relative;
 18+ top: 0px;
 19+ padding: 5px;
 20+}
 21+
 22+div.onlinestatusbarbody {
 23+ right:0px;
 24+ margin-top:-10px;
 25+}
Property changes on: trunk/extensions/OnlineStatusBar/OnlineStatusBarMono.css
___________________________________________________________________
Added: svn:eol-style
126 + native

Status & tagging log