r80785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80784‎ | r80785 | r80786 >
Date:01:41, 23 January 2011
Author:hartman
Status:ok
Tags:
Comment:
Port the remaining Skin.php skins standard(classic), Cologneblue and Nostalgia

* Converted Nostalgia's use of inline table alignment to CSS
* common_rtl.css is not in use now

Refs bug 26649
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/Nostalgia.php (modified) (history)
  • /trunk/phase3/skins/Standard.php (modified) (history)
  • /trunk/phase3/skins/common/cologneblue.css (modified) (history)
  • /trunk/phase3/skins/common/nostalgia.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/CologneBlue.php
@@ -17,10 +17,6 @@
1818 */
1919 class SkinCologneBlue extends Skin {
2020
21 - function getStylesheet() {
22 - return 'common/cologneblue.css';
23 - }
24 -
2521 function getSkinName() {
2622 return 'cologneblue';
2723 }
@@ -31,17 +27,17 @@
3228 $s = "\n<div id='content'>\n<div id='topbar'>" .
3329 '<table width="100%" border="0" cellspacing="0" cellpadding="8"><tr>';
3430
35 - $s .= '<td class="top" align="left" valign="middle" nowrap="nowrap">';
 31+ $s .= '<td class="top" nowrap="nowrap">';
3632 $s .= '<a href="' . $mainPageObj->escapeLocalURL() . '">';
3733 $s .= '<span id="sitetitle">' . wfMsg( 'sitetitle' ) . '</span></a>';
3834
39 - $s .= '</td><td class="top" align="right" valign="bottom" width="100%">';
 35+ $s .= '</td><td class="top" id="top-syslinks" width="100%">';
4036 $s .= $this->sysLinks();
41 - $s .= '</td></tr><tr><td valign="top">';
 37+ $s .= '</td></tr><tr><td class="top-linkcollection">';
4238
4339 $s .= '<font size="-1"><span id="sitesub">';
4440 $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>';
45 - $s .= '</td><td align="right">';
 41+ $s .= '</td><td class="top-linkcollection">';
4642
4743 $s .= '<font size="-1"><span id="langlinks">';
4844 $s .= str_replace( '<br />', '', $this->otherLanguages() );
@@ -77,7 +73,7 @@
7874 if ( 1 == $qb || 3 == $qb ) { # Left
7975 $s .= $this->getQuickbarCompensator();
8076 }
81 - $s .= '<td class="bottom" align="center" valign="top">';
 77+ $s .= '<td class="bottom">';
8278
8379 $s .= $this->bottomLinks();
8480 $s .= $wgLang->pipeList( array(
@@ -107,6 +103,9 @@
108104 }
109105
110106 function setupSkinUserCss( OutputPage $out ){
 107+ parent::setupSkinUserCss( $out );
 108+ $out->addModuleStyles( 'skins.cologneblue' );
 109+
111110 global $wgContLang;
112111 $qb = $this->qbSetting();
113112 $rules = array();
@@ -133,7 +132,6 @@
134133 $style = CSSJanus::transform( $style, true, false );
135134 }
136135 $out->addInlineStyle( $style );
137 - parent::setupSkinUserCss( $out );
138136 }
139137
140138 function sysLinks() {
Index: trunk/phase3/skins/Standard.php
@@ -20,6 +20,9 @@
2121 *
2222 */
2323 function setupSkinUserCss( OutputPage $out ){
 24+ parent::setupSkinUserCss( $out );
 25+ $out->AddModuleStyles( 'skins.standard' );
 26+
2427 global $wgContLang;
2528 $qb = $this->qbSetting();
2629 $rules = array();
@@ -43,7 +46,6 @@
4447 $style = CSSJanus::transform( $style, true, false );
4548 }
4649 $out->addInlineStyle( $style );
47 - parent::setupSkinUserCss( $out );
4850 }
4951
5052 function doAfterContent() {
@@ -61,9 +63,6 @@
6264 $qb = $this->qbSetting();
6365 $shove = ( $qb != 0 );
6466 $left = ( $qb == 1 || $qb == 3 );
65 - if( $wgContLang->isRTL() ) {
66 - $left = !$left;
67 - }
6867
6968 if ( $shove && $left ) { # Left
7069 $s .= $this->getQuickbarCompensator();
Index: trunk/phase3/skins/common/cologneblue.css
@@ -96,10 +96,20 @@
9797 font-size: 10pt;
9898 }
9999
 100+td#top-syslinks {
 101+ text-align: right;
 102+ vertical-align: bottom;
 103+}
 104+td.top-linkcollection {
 105+ text-align: right;
 106+}
 107+
100108 td.bottom {
101109 font-family: Verdana, Arial, sans-serif;
102110 font-size: 10pt;
103111 padding: 0;
 112+ text-align: center;
 113+ vertical-align: bottom;
104114 }
105115
106116 #pagestats {
@@ -207,4 +217,4 @@
208218
209219 input.mw-searchInput {
210220 width: 106px;
211 -}
\ No newline at end of file
 221+}
Index: trunk/phase3/skins/common/nostalgia.css
@@ -46,3 +46,6 @@
4747 padding-top: 0;
4848 margin-top: 0;
4949 }
 50+div.sitenotice {
 51+ clear: both;
 52+}
Index: trunk/phase3/skins/Nostalgia.php
@@ -16,14 +16,15 @@
1717 */
1818 class SkinNostalgia extends Skin {
1919
20 - function getStylesheet() {
21 - return 'common/nostalgia.css';
22 - }
23 -
2420 function getSkinName() {
2521 return 'nostalgia';
2622 }
2723
 24+ function setupSkinUserCss( OutputPage $out ){
 25+ parent::setupSkinUserCss( $out );
 26+ $out->addModuleStyles( 'skins.nostalgia' );
 27+ }
 28+
2829 function doBeforeContent() {
2930 $s = "\n<div id='content'>\n<div id='top'>\n";
3031 $s .= '<div id="logo">' . $this->logoText( 'right' ) . '</div>';
Index: trunk/phase3/includes/Skin.php
@@ -660,9 +660,6 @@
661661 function setupSkinUserCss( OutputPage $out ) {
662662 $out->addModuleStyles( 'mediawiki.legacy.shared' );
663663 $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
664 - // TODO: When converting old skins to use ResourceLoader (or removing them) the following should be reconsidered
665 - $out->addStyle( $this->getStylesheet() );
666 - $out->addStyle( 'common/common_rtl.css', '', '', 'rtl' );
667664 }
668665
669666 function getPageClasses( $title ) {
@@ -729,10 +726,6 @@
730727 $shove = ( $qb != 0 );
731728 $left = ( $qb == 1 || $qb == 3 );
732729
733 - if ( $wgContLang->isRTL() ) {
734 - $left = !$left;
735 - }
736 -
737730 if ( !$shove ) {
738731 $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
739732 $this->logoText() . '</td>';
Index: trunk/phase3/resources/Resources.php
@@ -29,6 +29,15 @@
3030 'styles' => array( 'skins/modern/main.css' => array( 'media' => 'screen' ),
3131 'skins/modern/print.css' => array( 'media' => 'print' ) ),
3232 ),
 33+ 'skins.cologneblue' => array(
 34+ 'styles' => array( 'skins/common/cologneblue.css' => array( 'media' => 'screen' ) ),
 35+ ),
 36+ 'skins.nostalgia' => array(
 37+ 'styles' => array( 'skins/common/nostalgia.css' => array( 'media' => 'screen' ) ),
 38+ ),
 39+ 'skins.standard' => array(
 40+ 'styles' => array( 'skins/common/wikistandard.css' => array( 'media' => 'screen' ) ),
 41+ ),
3342
3443 /* jQuery */
3544

Sign-offs

UserFlagDate
Krinkleinspected03:16, 29 May 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r80924Integrate what was functionally left of common_rtl.css into oldshared.css...hartman21:50, 24 January 2011
r103677Fix the sitesub of cologneblue. Follow up to r80785hartman14:09, 19 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80771Finish porting the Simple skin to resourceloader....hartman21:16, 22 January 2011
r80776Port Modern to resourceloader...hartman22:46, 22 January 2011

Status & tagging log