Index: trunk/phase3/skins/monobook/rtl.css |
— | — | @@ -240,6 +240,11 @@ |
241 | 241 | html > body div#bodyContent ul#filetoc { |
242 | 242 | display: block; |
243 | 243 | } |
| 244 | + |
| 245 | +/* Special:Allpages styling */ |
| 246 | +td.mw-allpages-nav, p.mw-allpages-nav { |
| 247 | + text-align: left; |
| 248 | + |
244 | 249 | /* Special:Prefixindex styling */ |
245 | 250 | td#mw-prefixindex-nav-form { |
246 | 251 | text-align: left; |
Index: trunk/phase3/skins/modern/rtl.css |
— | — | @@ -152,6 +152,10 @@ |
153 | 153 | display: block; |
154 | 154 | } |
155 | 155 | |
| 156 | +/* Special:Allpages styling */ |
| 157 | +td.mw-allpages-nav, p.mw-allpages-nav { |
| 158 | + text-align: left; |
| 159 | + |
156 | 160 | /* Special:Prefixindex styling */ |
157 | 161 | td#mw-prefixindex-nav-form { |
158 | 162 | text-align: left; |
Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -300,6 +300,23 @@ |
301 | 301 | font-weight: bold; |
302 | 302 | } |
303 | 303 | |
| 304 | +/* Special:Allpages styling */ |
| 305 | +table.allpageslist { |
| 306 | + background-color: transparent; |
| 307 | +} |
| 308 | +table.mw-allpages-table-form, table.mw-allpages-table-chunk { |
| 309 | + background-color: transparent; |
| 310 | + width: 100%; |
| 311 | +} |
| 312 | +td.mw-allpages-nav, p.mw-allpages-nav { |
| 313 | + text-align: right; |
| 314 | + font-size: smaller; |
| 315 | + margin-bottom: 1em; |
| 316 | +} |
| 317 | +table.mw-allpages-table-form tr { |
| 318 | + vertical-align: top; |
| 319 | +} |
| 320 | + |
304 | 321 | /* Special:Prefixindex styling */ |
305 | 322 | table#mw-prefixindex-list-table, |
306 | 323 | table#mw-prefixindex-nav-table { |
Index: trunk/phase3/skins/simple/rtl.css |
— | — | @@ -174,6 +174,11 @@ |
175 | 175 | html > body div#bodyContent ul { |
176 | 176 | display: table; |
177 | 177 | } |
| 178 | + |
| 179 | +/* Special:Allpages styling */ |
| 180 | +td.mw-allpages-nav, p.mw-allpages-nav { |
| 181 | + text-align: left; |
| 182 | + |
178 | 183 | /* Special:Prefixindex styling */ |
179 | 184 | td#mw-prefixindex-nav-form { |
180 | 185 | text-align: left; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1477,7 +1477,7 @@ |
1478 | 1478 | * to ensure that client-side caches don't keep obsolete copies of global |
1479 | 1479 | * styles. |
1480 | 1480 | */ |
1481 | | -$wgStyleVersion = '210'; |
| 1481 | +$wgStyleVersion = '211'; |
1482 | 1482 | |
1483 | 1483 | |
1484 | 1484 | # Server-side caching: |
Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -114,8 +114,7 @@ |
115 | 115 | * @param integer $namespace (default NS_MAIN) |
116 | 116 | */ |
117 | 117 | function showToplevel( $namespace = NS_MAIN, $from = '', $to = '' ) { |
118 | | - global $wgOut, $wgContLang; |
119 | | - $align = $wgContLang->isRtl() ? 'left' : 'right'; |
| 118 | + global $wgOut; |
120 | 119 | |
121 | 120 | # TODO: Either make this *much* faster or cache the title index points |
122 | 121 | # in the querycache table. |
— | — | @@ -198,13 +197,13 @@ |
199 | 198 | } |
200 | 199 | |
201 | 200 | # At this point, $lines should contain an even number of elements. |
202 | | - $out .= "<table class='allpageslist' style='background: inherit;'>"; |
| 201 | + $out .= Xml::openElement( 'table', array( 'class' => 'allpageslist' ) ); |
203 | 202 | while( count ( $lines ) > 0 ) { |
204 | 203 | $inpoint = array_shift( $lines ); |
205 | 204 | $outpoint = array_shift( $lines ); |
206 | 205 | $out .= $this->showline( $inpoint, $outpoint, $namespace ); |
207 | 206 | } |
208 | | - $out .= '</table>'; |
| 207 | + $out .= Xml::closeElement( 'table' ); |
209 | 208 | $nsForm = $this->namespaceForm( $namespace, $from, $to ); |
210 | 209 | |
211 | 210 | # Is there more? |
— | — | @@ -213,11 +212,17 @@ |
214 | 213 | } else { |
215 | 214 | if( isset($from) || isset($to) ) { |
216 | 215 | global $wgUser; |
217 | | - $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">'; |
218 | | - $out2 .= '<tr valign="top"><td>' . $nsForm; |
219 | | - $out2 .= '</td><td align="' . $align . '" style="font-size: smaller; margin-bottom: 1em;">' . |
220 | | - $wgUser->getSkin()->makeKnownLinkObj( $this->getTitle(), wfMsgHtml ( 'allpages' ) ); |
221 | | - $out2 .= "</td></tr></table>"; |
| 216 | + $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ). |
| 217 | + '<tr> |
| 218 | + <td>' . |
| 219 | + $nsForm . |
| 220 | + '</td> |
| 221 | + <td class="mw-allpages-nav">' . |
| 222 | + $wgUser->getSkin()->link( $this->getTitle(), wfMsgHtml ( 'allpages' ), |
| 223 | + array(), array(), 'known' ) . |
| 224 | + "</td> |
| 225 | + </tr>" . |
| 226 | + Xml::closeElement( 'table' ); |
222 | 227 | } else { |
223 | 228 | $out2 = $nsForm; |
224 | 229 | } |
— | — | @@ -233,7 +238,6 @@ |
234 | 239 | */ |
235 | 240 | function showline( $inpoint, $outpoint, $namespace = NS_MAIN ) { |
236 | 241 | global $wgContLang; |
237 | | - $align = $wgContLang->isRtl() ? 'left' : 'right'; |
238 | 242 | $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) ); |
239 | 243 | $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) ); |
240 | 244 | // Don't let the length runaway |
— | — | @@ -248,7 +252,7 @@ |
249 | 253 | "<a href=\"$link\">$inpointf</a></td><td>", |
250 | 254 | "</td><td><a href=\"$link\">$outpointf</a>" |
251 | 255 | ); |
252 | | - return '<tr><td align="' . $align . '">'.$out.'</td></tr>'; |
| 256 | + return '<tr><td class="mw-allpages-nav">' . $out . '</td></tr>'; |
253 | 257 | } |
254 | 258 | |
255 | 259 | /** |
— | — | @@ -264,8 +268,6 @@ |
265 | 269 | $fromList = $this->getNamespaceKeyAndText($namespace, $from); |
266 | 270 | $toList = $this->getNamespaceKeyAndText( $namespace, $to ); |
267 | 271 | $namespaces = $wgContLang->getNamespaces(); |
268 | | - $align = $wgContLang->isRtl() ? 'left' : 'right'; |
269 | | - |
270 | 272 | $n = 0; |
271 | 273 | |
272 | 274 | if ( !$fromList || !$toList ) { |
— | — | @@ -299,8 +301,7 @@ |
300 | 302 | ); |
301 | 303 | |
302 | 304 | if( $res->numRows() > 0 ) { |
303 | | - $out = '<table style="background: inherit;" border="0" width="100%">'; |
304 | | - |
| 305 | + $out = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-chunk' ) ); |
305 | 306 | while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { |
306 | 307 | $t = Title::makeTitle( $s->page_namespace, $s->page_title ); |
307 | 308 | if( $t ) { |
— | — | @@ -316,13 +317,13 @@ |
317 | 318 | $out .= "<td width=\"33%\">$link</td>"; |
318 | 319 | $n++; |
319 | 320 | if( $n % 3 == 0 ) { |
320 | | - $out .= '</tr>'; |
| 321 | + $out .= "</tr>\n"; |
321 | 322 | } |
322 | 323 | } |
323 | 324 | if( ($n % 3) != 0 ) { |
324 | | - $out .= '</tr>'; |
| 325 | + $out .= "</tr>\n"; |
325 | 326 | } |
326 | | - $out .= '</table>'; |
| 327 | + $out .= Xml::closeElement( 'table' ); |
327 | 328 | } else { |
328 | 329 | $out = ''; |
329 | 330 | } |
— | — | @@ -370,11 +371,13 @@ |
371 | 372 | $self = $this->getTitle(); |
372 | 373 | |
373 | 374 | $nsForm = $this->namespaceForm( $namespace, $from, $to ); |
374 | | - $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">'; |
375 | | - $out2 .= '<tr valign="top"><td>' . $nsForm; |
376 | | - $out2 .= '</td><td align="' . $align . '" style="font-size: smaller; margin-bottom: 1em;">' . |
377 | | - $sk->makeKnownLinkObj( $self, |
378 | | - wfMsgHtml ( 'allpages' ) ); |
| 375 | + $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ). |
| 376 | + '<tr> |
| 377 | + <td>' . |
| 378 | + $nsForm . |
| 379 | + '</td> |
| 380 | + <td class="mw-allpages-nav">' . |
| 381 | + $sk->link( $self, wfMsgHtml ( 'allpages' ), array(), array(), 'known' ); |
379 | 382 | |
380 | 383 | # Do we put a previous link ? |
381 | 384 | if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) { |
— | — | @@ -399,7 +402,7 @@ |
400 | 403 | |
401 | 404 | $wgOut->addHTML( $out2 . $out ); |
402 | 405 | if( isset($prevLink) or isset($nextLink) ) { |
403 | | - $wgOut->addHTML( '<hr /><p style="font-size: smaller; float: ' . $align . '">' ); |
| 406 | + $wgOut->addHTML( '<hr /><p class="mw-allpages-nav">' ); |
404 | 407 | if( isset( $prevLink ) ) { |
405 | 408 | $wgOut->addHTML( $prevLink ); |
406 | 409 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -164,6 +164,7 @@ |
165 | 165 | * Added new hook 'MessageCacheReplace' into MessageCache.php. For instance |
166 | 166 | to allow extensions to update caches in similar way as MediaWiki invalidates |
167 | 167 | a cached MonoBook sidebar |
| 168 | +* Special:AllPages: Move hardcoded styles from code to CSS |
168 | 169 | |
169 | 170 | === Bug fixes in 1.15 === |
170 | 171 | * (bug 16968) Special:Upload no longer throws useless warnings. |