Port the remaining Skin.php skins standard(classic), Cologneblue and Nostalgia
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 23 Jan 2011 01:41:13 +0000 (01:41 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 23 Jan 2011 01:41:13 +0000 (01:41 +0000)
* Converted Nostalgia's use of inline table alignment to CSS
* common_rtl.css is not in use now

Refs bug 26649

includes/Skin.php
resources/Resources.php
skins/CologneBlue.php
skins/Nostalgia.php
skins/Standard.php
skins/common/cologneblue.css
skins/common/nostalgia.css

index 15536c4..5842538 100644 (file)
@@ -660,9 +660,6 @@ class Skin extends Linker {
        function setupSkinUserCss( OutputPage $out ) {
                $out->addModuleStyles( 'mediawiki.legacy.shared' );
                $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
-               // TODO: When converting old skins to use ResourceLoader (or removing them) the following should be reconsidered
-               $out->addStyle( $this->getStylesheet() );
-               $out->addStyle( 'common/common_rtl.css', '', '', 'rtl' );
        }
 
        function getPageClasses( $title ) {
@@ -729,10 +726,6 @@ class Skin extends Linker {
                $shove = ( $qb != 0 );
                $left = ( $qb == 1 || $qb == 3 );
 
-               if ( $wgContLang->isRTL() ) {
-                       $left = !$left;
-               }
-
                if ( !$shove ) {
                        $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
                                $this->logoText() . '</td>';
index c68ebda..1007925 100644 (file)
@@ -29,6 +29,15 @@ return array(
                'styles' => array( 'skins/modern/main.css' => array( 'media' => 'screen' ),
                                   'skins/modern/print.css' => array( 'media' => 'print' ) ),
        ),
+       'skins.cologneblue' => array(
+               'styles' => array( 'skins/common/cologneblue.css' => array( 'media' => 'screen' ) ),
+       ),
+       'skins.nostalgia' => array(
+               'styles' => array( 'skins/common/nostalgia.css' => array( 'media' => 'screen' ) ),
+       ),
+       'skins.standard' => array(
+               'styles' => array( 'skins/common/wikistandard.css' => array( 'media' => 'screen' ) ),
+       ),
 
        /* jQuery */
 
index 1ff2cca..2fdfe87 100644 (file)
@@ -17,10 +17,6 @@ if( !defined( 'MEDIAWIKI' ) ) {
  */
 class SkinCologneBlue extends Skin {
 
-       function getStylesheet() {
-               return 'common/cologneblue.css';
-       }
-
        function getSkinName() {
                return 'cologneblue';
        }
@@ -31,17 +27,17 @@ class SkinCologneBlue extends Skin {
                $s = "\n<div id='content'>\n<div id='topbar'>" .
                  '<table width="100%" border="0" cellspacing="0" cellpadding="8"><tr>';
 
-               $s .= '<td class="top" align="left" valign="middle" nowrap="nowrap">';
+               $s .= '<td class="top" nowrap="nowrap">';
                $s .= '<a href="' . $mainPageObj->escapeLocalURL() . '">';
                $s .= '<span id="sitetitle">' . wfMsg( 'sitetitle' ) . '</span></a>';
 
-               $s .= '</td><td class="top" align="right" valign="bottom" width="100%">';
+               $s .= '</td><td class="top" id="top-syslinks" width="100%">';
                $s .= $this->sysLinks();
-               $s .= '</td></tr><tr><td valign="top">';
+               $s .= '</td></tr><tr><td class="top-linkcollection">';
 
                $s .= '<font size="-1"><span id="sitesub">';
                $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>';
-               $s .= '</td><td align="right">';
+               $s .= '</td><td class="top-linkcollection">';
 
                $s .= '<font size="-1"><span id="langlinks">';
                $s .= str_replace( '<br />', '', $this->otherLanguages() );
@@ -77,7 +73,7 @@ class SkinCologneBlue extends Skin {
                if ( 1 == $qb || 3 == $qb ) { # Left
                        $s .= $this->getQuickbarCompensator();
                }
-               $s .= '<td class="bottom" align="center" valign="top">';
+               $s .= '<td class="bottom">';
 
                $s .= $this->bottomLinks();
                $s .= $wgLang->pipeList( array(
@@ -107,6 +103,9 @@ class SkinCologneBlue extends Skin {
        }
 
        function setupSkinUserCss( OutputPage $out ){
+               parent::setupSkinUserCss( $out );
+               $out->addModuleStyles( 'skins.cologneblue' );
+
                global $wgContLang;
                $qb = $this->qbSetting();
                $rules = array();
@@ -133,7 +132,6 @@ class SkinCologneBlue extends Skin {
                        $style = CSSJanus::transform( $style, true, false );
                }
                $out->addInlineStyle( $style );
-               parent::setupSkinUserCss( $out );
        }
 
        function sysLinks() {
index 6c599b2..5242fe3 100644 (file)
@@ -16,14 +16,15 @@ if( !defined( 'MEDIAWIKI' ) ) {
  */
 class SkinNostalgia extends Skin {
 
-       function getStylesheet() {
-               return 'common/nostalgia.css';
-       }
-
        function getSkinName() {
                return 'nostalgia';
        }
 
+       function setupSkinUserCss( OutputPage $out ){
+               parent::setupSkinUserCss( $out );
+               $out->addModuleStyles( 'skins.nostalgia' );
+       }
+
        function doBeforeContent() {
                $s = "\n<div id='content'>\n<div id='top'>\n";
                $s .= '<div id="logo">' . $this->logoText( 'right' ) . '</div>';
index 2ea6896..e0c009b 100644 (file)
@@ -20,6 +20,9 @@ class SkinStandard extends Skin {
         *
         */
        function setupSkinUserCss( OutputPage $out ){
+               parent::setupSkinUserCss( $out );
+               $out->AddModuleStyles( 'skins.standard' );
+
                global $wgContLang;
                $qb = $this->qbSetting();
                $rules = array();
@@ -43,7 +46,6 @@ class SkinStandard extends Skin {
                        $style = CSSJanus::transform( $style, true, false );
                }
                $out->addInlineStyle( $style );
-               parent::setupSkinUserCss( $out );
        }
 
        function doAfterContent() {
@@ -61,9 +63,6 @@ class SkinStandard extends Skin {
                $qb = $this->qbSetting();
                $shove = ( $qb != 0 );
                $left = ( $qb == 1 || $qb == 3 );
-               if( $wgContLang->isRTL() ) {
-                       $left = !$left;
-               }
 
                if ( $shove && $left ) { # Left
                        $s .= $this->getQuickbarCompensator();
index c7b6eac..d5ed280 100644 (file)
@@ -96,10 +96,20 @@ td.top a {
        font-size: 10pt;
 }
 
+td#top-syslinks {
+       text-align: right;
+       vertical-align: bottom;
+}
+td.top-linkcollection {
+       text-align: right;
+}
+
 td.bottom {
        font-family: Verdana, Arial, sans-serif;
        font-size: 10pt;
        padding: 0;
+       text-align: center;
+       vertical-align: bottom;
 }
 
 #pagestats {
@@ -207,4 +217,4 @@ small {
 
 input.mw-searchInput {
        width: 106px;
-}
\ No newline at end of file
+}
index e1b774d..1cac7a7 100644 (file)
@@ -46,3 +46,6 @@ p.subtitle {
        padding-top: 0;
        margin-top: 0;
 }
+div.sitenotice {
+       clear: both;
+}