Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -106,28 +106,33 @@ |
107 | 107 | return $s; |
108 | 108 | } |
109 | 109 | |
110 | | - function reallyGenerateUserStylesheet() { |
111 | | - $s = parent::reallyGenerateUserStylesheet(); |
| 110 | + function setupSkinUserCss( OutputPage $out ){ |
| 111 | + global $wgContLang; |
112 | 112 | $qb = $this->qbSetting(); |
113 | 113 | |
114 | 114 | if ( 2 == $qb ) { # Right |
115 | | - $s .= "#quickbar { position: absolute; right: 4px; }\n" . |
116 | | - "#article { margin-left: 4px; margin-right: 148px; }\n"; |
| 115 | + $rules[] = "#quickbar { position: absolute; right: 4px; }"; |
| 116 | + $rules[] = "#article { margin-left: 4px; margin-right: 148px; }"; |
117 | 117 | } elseif ( 1 == $qb ) { |
118 | | - $s .= "#quickbar { position: absolute; left: 4px; }\n" . |
119 | | - "#article { margin-left: 148px; margin-right: 4px; }\n"; |
| 118 | + $rules[] = "#quickbar { position: absolute; left: 4px; }"; |
| 119 | + $rules[] = "#article { margin-left: 148px; margin-right: 4px; }"; |
120 | 120 | } elseif ( 3 == $qb ) { # Floating left |
121 | | - $s .= "#quickbar { position:absolute; left:4px } \n" . |
122 | | - "#topbar { margin-left: 148px }\n" . |
123 | | - "#article { margin-left:148px; margin-right: 4px; } \n" . |
124 | | - "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE |
| 121 | + $rules[] = "#quickbar { position:absolute; left:4px }"; |
| 122 | + $rules[] = "#topbar { margin-left: 148px }"; |
| 123 | + $rules[] = "#article { margin-left:148px; margin-right: 4px; }"; |
| 124 | + $rules[] = "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;}"; # Hides from IE |
125 | 125 | } elseif ( 4 == $qb ) { # Floating right |
126 | | - $s .= "#quickbar { position: fixed; right: 4px; } \n" . |
127 | | - "#topbar { margin-right: 148px }\n" . |
128 | | - "#article { margin-right: 148px; margin-left: 4px; } \n" . |
129 | | - "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE |
| 126 | + $rules[] = "#quickbar { position: fixed; right: 4px; }"; |
| 127 | + $rules[] = "#topbar { margin-right: 148px }"; |
| 128 | + $rules[] = "#article { margin-right: 148px; margin-left: 4px; }"; |
| 129 | + $rules[] = "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;}"; # Hides from IE |
130 | 130 | } |
131 | | - return $s; |
| 131 | + $style = implode( "\n", $rules ); |
| 132 | + if ( $wgContLang->getDir() === 'rtl' ) { |
| 133 | + $style = CSSJanus::transform( $style, true, false ); |
| 134 | + } |
| 135 | + $out->addInlineStyle( $style ); |
| 136 | + parent::setupSkinUserCss( $out ); |
132 | 137 | } |
133 | 138 | |
134 | 139 | function sysLinks() { |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -20,34 +20,28 @@ |
21 | 21 | * |
22 | 22 | */ |
23 | 23 | function setupSkinUserCss( OutputPage $out ){ |
24 | | - if ( 3 == $this->qbSetting() ) { # Floating left |
25 | | - $out->addStyle( 'common/quickbar.css' ); |
26 | | - } elseif ( 4 == $this->qbSetting() ) { # Floating right |
27 | | - $out->addStyle( 'common/quickbar-right.css' ); |
28 | | - } |
29 | | - parent::setupSkinUserCss( $out ); |
30 | | - } |
31 | | - |
32 | | - /** |
33 | | - * |
34 | | - */ |
35 | | - function reallyGenerateUserStylesheet() { |
36 | | - $s = parent::reallyGenerateUserStylesheet(); |
| 24 | + global $wgContLang; |
37 | 25 | $qb = $this->qbSetting(); |
38 | | - |
39 | 26 | if ( 2 == $qb ) { # Right |
40 | | - $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . |
41 | | - "border-left: 2px solid #000000; }\n" . |
42 | | - "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; |
| 27 | + $rules[] = "#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }"; |
| 28 | + $rules[] = "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; |
43 | 29 | } elseif ( 1 == $qb || 3 == $qb ) { |
44 | | - $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . |
45 | | - "border-right: 1px solid gray; }\n" . |
46 | | - "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; |
| 30 | + $rules[] = "#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }"; |
| 31 | + $rules[] = "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; |
| 32 | + if( 3 == $qb ) { |
| 33 | + $rules[] = "#quickbar { position: fixed; padding: 4px; }"; |
| 34 | + } |
47 | 35 | } elseif ( 4 == $qb ) { |
48 | | - $s .= "#quickbar { border-right: 1px solid gray; }\n" . |
49 | | - "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; |
| 36 | + $rules[] = "#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}"; |
| 37 | + $rules[] = "#quickbar { border-right: 1px solid gray; }"; |
| 38 | + $rules[] = "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
50 | 39 | } |
51 | | - return $s; |
| 40 | + $style = implode( "\n", $rules ); |
| 41 | + if ( $wgContLang->getDir() === 'rtl' ) { |
| 42 | + $style = CSSJanus::transform( $style, true, false ); |
| 43 | + } |
| 44 | + $out->addInlineStyle( $style ); |
| 45 | + parent::setupSkinUserCss( $out ); |
52 | 46 | } |
53 | 47 | |
54 | 48 | function doAfterContent() { |
Index: trunk/phase3/skins/common/quickbar.css |
— | — | @@ -1 +0,0 @@ |
2 | | -#quickbar { position: fixed; padding: 4px; } |
Index: trunk/phase3/skins/common/quickbar-right.css |
— | — | @@ -1 +0,0 @@ |
2 | | -#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;} |