Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -32,19 +32,23 @@ |
33 | 33 | if ( 2 == $qb ) { # Right |
34 | 34 | $rules[] = "/* @noflip */#quickbar { position: absolute; right: 4px; }"; |
35 | 35 | $rules[] = "/* @noflip */#article { margin-left: 4px; margin-right: 148px; }"; |
| 36 | + $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }"; |
36 | 37 | } elseif ( 1 == $qb ) { |
37 | 38 | $rules[] = "/* @noflip */#quickbar { position: absolute; left: 4px; }"; |
38 | 39 | $rules[] = "/* @noflip */#article { margin-left: 148px; margin-right: 4px; }"; |
| 40 | + $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }"; |
39 | 41 | } elseif ( 3 == $qb ) { # Floating left |
40 | 42 | $rules[] = "/* @noflip */#quickbar { position:absolute; left:4px }"; |
41 | 43 | $rules[] = "/* @noflip */#topbar { margin-left: 148px }"; |
42 | 44 | $rules[] = "/* @noflip */#article { margin-left:148px; margin-right: 4px; }"; |
43 | 45 | $rules[] = "/* @noflip */body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto; bottom:4px;}"; # Hides from IE |
| 46 | + $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }"; |
44 | 47 | } elseif ( 4 == $qb ) { # Floating right |
45 | 48 | $rules[] = "/* @noflip */#quickbar { position: fixed; right: 4px; }"; |
46 | 49 | $rules[] = "/* @noflip */#topbar { margin-right: 148px }"; |
47 | 50 | $rules[] = "/* @noflip */#article { margin-right: 148px; margin-left: 4px; }"; |
48 | 51 | $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE |
| 52 | + $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }"; |
49 | 53 | } |
50 | 54 | $style = implode( "\n", $rules ); |
51 | 55 | $out->addInlineStyle( $style, 'flip' ); |
— | — | @@ -105,10 +109,6 @@ |
106 | 110 | $s .= "\n<div id='footer'>"; |
107 | 111 | $s .= '<table width="98%" border="0" cellspacing="0"><tr>'; |
108 | 112 | |
109 | | - $qb = $this->getSkin()->qbSetting(); |
110 | | - if ( 1 == $qb || 3 == $qb ) { # Left |
111 | | - $s .= $this->getQuickbarCompensator(); |
112 | | - } |
113 | 113 | $s .= '<td class="bottom">'; |
114 | 114 | |
115 | 115 | $s .= $this->bottomLinks(); |
— | — | @@ -127,12 +127,9 @@ |
128 | 128 | $s .= "\n<br />" . $this->pageStats(); |
129 | 129 | |
130 | 130 | $s .= '</td>'; |
131 | | - if ( 2 == $qb ) { # Right |
132 | | - $s .= $this->getQuickbarCompensator(); |
133 | | - } |
134 | 131 | $s .= "</tr></table>\n</div>\n</div>\n"; |
135 | 132 | |
136 | | - if ( 0 != $qb ) { |
| 133 | + if ( $this->getSkin()->qbSetting() != 0 ) { |
137 | 134 | $s .= $this->quickBar(); |
138 | 135 | } |
139 | 136 | return $s; |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -31,9 +31,11 @@ |
32 | 32 | if ( 2 == $qb ) { # Right |
33 | 33 | $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }"; |
34 | 34 | $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; |
| 35 | + $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }"; |
35 | 36 | } elseif ( 1 == $qb || 3 == $qb ) { |
36 | 37 | $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }"; |
37 | 38 | $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; |
| 39 | + $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }"; |
38 | 40 | if( 3 == $qb ) { |
39 | 41 | $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }"; |
40 | 42 | } |
— | — | @@ -41,6 +43,7 @@ |
42 | 44 | $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}"; |
43 | 45 | $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }"; |
44 | 46 | $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
| 47 | + $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }"; |
45 | 48 | } |
46 | 49 | $style = implode( "\n", $rules ); |
47 | 50 | $out->addInlineStyle( $style, 'flip' ); |
— | — | @@ -54,7 +57,6 @@ |
55 | 58 | * @return string |
56 | 59 | */ |
57 | 60 | function doAfterContent() { |
58 | | - global $wgContLang; |
59 | 61 | wfProfileIn( __METHOD__ ); |
60 | 62 | wfProfileIn( __METHOD__ . '-1' ); |
61 | 63 | |
— | — | @@ -64,17 +66,7 @@ |
65 | 67 | |
66 | 68 | wfProfileOut( __METHOD__ . '-1' ); |
67 | 69 | wfProfileIn( __METHOD__ . '-2' ); |
68 | | - |
69 | | - $qb = $this->getSkin()->qbSetting(); |
70 | | - $shove = ( $qb != 0 ); |
71 | | - $left = ( $qb == 1 || $qb == 3 ); |
72 | | - |
73 | | - if ( $shove && $left ) { # Left |
74 | | - $s .= $this->getQuickbarCompensator(); |
75 | | - } |
76 | | - wfProfileOut( __METHOD__ . '-2' ); |
77 | | - wfProfileIn( __METHOD__ . '-3' ); |
78 | | - $l = $wgContLang->alignStart(); |
| 70 | + $l = $this->getSkin()->getLang()->alignStart(); |
79 | 71 | $s .= "<td class='bottom' align='$l' valign='top'>"; |
80 | 72 | |
81 | 73 | $s .= $this->bottomLinks(); |
— | — | @@ -86,17 +78,14 @@ |
87 | 79 | . '<br /><span id="pagestats">' . $this->pageStats() . '</span>'; |
88 | 80 | |
89 | 81 | $s .= '</td>'; |
90 | | - if ( $shove && !$left ) { # Right |
91 | | - $s .= $this->getQuickbarCompensator(); |
92 | | - } |
93 | 82 | $s .= "</tr></table>\n</div>\n</div>\n"; |
94 | 83 | |
95 | | - wfProfileOut( __METHOD__ . '-3' ); |
96 | | - wfProfileIn( __METHOD__ . '-4' ); |
97 | | - if ( 0 != $qb ) { |
| 84 | + wfProfileOut( __METHOD__ . '-2' ); |
| 85 | + wfProfileIn( __METHOD__ . '-3' ); |
| 86 | + if ( $this->getSkin()->qbSetting() != 0 ) { |
98 | 87 | $s .= $this->quickBar(); |
99 | 88 | } |
100 | | - wfProfileOut( __METHOD__ . '-4' ); |
| 89 | + wfProfileOut( __METHOD__ . '-3' ); |
101 | 90 | wfProfileOut( __METHOD__ ); |
102 | 91 | return $s; |
103 | 92 | } |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -90,11 +90,10 @@ |
91 | 91 | } |
92 | 92 | |
93 | 93 | function doBeforeContent() { |
94 | | - global $wgContLang; |
| 94 | + global $wgLang; |
95 | 95 | wfProfileIn( __METHOD__ ); |
96 | 96 | |
97 | 97 | $s = ''; |
98 | | - $qb = $this->getSkin()->qbSetting(); |
99 | 98 | |
100 | 99 | $langlinks = $this->otherLanguages(); |
101 | 100 | if ( $langlinks ) { |
— | — | @@ -107,25 +106,20 @@ |
108 | 107 | } |
109 | 108 | |
110 | 109 | $s .= "\n<div id='content'>\n<div id='topbar'>\n" . |
111 | | - "<table border='0' cellspacing='0' width='98%'>\n<tr>\n"; |
| 110 | + "<table border='0' cellspacing='0' width='100%'>\n<tr>\n"; |
112 | 111 | |
113 | | - $shove = ( $qb != 0 ); |
114 | | - $left = ( $qb == 1 || $qb == 3 ); |
115 | | - |
116 | | - if ( !$shove ) { |
| 112 | + if ( $this->getSkin()->qbSetting() == 0 ) { |
117 | 113 | $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" . |
118 | | - $this->getSkin()->logoText() . '</td>'; |
119 | | - } elseif ( $left ) { |
120 | | - $s .= $this->getQuickbarCompensator( $rows ); |
| 114 | + $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>'; |
121 | 115 | } |
122 | 116 | |
123 | | - $l = $wgContLang->alignStart(); |
| 117 | + $l = $wgLang->alignStart(); |
124 | 118 | $s .= "<td {$borderhack} align='$l' valign='top'>\n"; |
125 | 119 | |
126 | 120 | $s .= $this->topLinks(); |
127 | 121 | $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n"; |
128 | 122 | |
129 | | - $r = $wgContLang->alignEnd(); |
| 123 | + $r = $wgLang->alignEnd(); |
130 | 124 | $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>"; |
131 | 125 | $s .= $this->nameAndLogin(); |
132 | 126 | $s .= "\n<br />" . $this->searchForm() . '</td>'; |
— | — | @@ -134,10 +128,6 @@ |
135 | 129 | $s .= "</tr>\n<tr>\n<td class='top' colspan=\"2\">$langlinks</td>\n"; |
136 | 130 | } |
137 | 131 | |
138 | | - if ( $shove && !$left ) { # Right |
139 | | - $s .= $this->getQuickbarCompensator( $rows ); |
140 | | - } |
141 | | - |
142 | 132 | $s .= "</tr>\n</table>\n</div>\n"; |
143 | 133 | $s .= "\n<div id='article'>\n"; |
144 | 134 | |
— | — | @@ -593,6 +583,9 @@ |
594 | 584 | return $wgLang->pipeList( $s ); |
595 | 585 | } |
596 | 586 | |
| 587 | + /** |
| 588 | + * @deprecated in 1.19 |
| 589 | + */ |
597 | 590 | function getQuickbarCompensator( $rows = 1 ) { |
598 | 591 | return "<td width='152' rowspan='{$rows}'> </td>"; |
599 | 592 | } |