r95968 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95967‎ | r95968 | r95969 >
Date:12:11, 1 September 2011
Author:krinkle
Status:ok
Tags:
Comment:
Use .mw-datatable where TablePager is used in extensions.
* Should be fairly rare as both getTableClasses() and getBodyStart() in TablePager have good defaults. But in cases where both are overridden it needs to be fixed.
* Then there are the bad boys that used the TablePager css class for a table that wasn't generated by TablePager at all. Oohooh!

(Follows-up r95960)
Modified paths:
  • /trunk/extensions/CloseWikis/CloseWikis.list.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/pages/DetailsPage.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/pages/TranslatePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CloseWikis/CloseWikis.list.php
@@ -35,7 +35,7 @@
3636
3737 $this->setHeaders();
3838 $wgOut->addWikiMsg( 'closewikis-list-intro' );
39 - $wgOut->addHTML( '<table class="TablePager" style="width: 100%"><tr>' );
 39+ $wgOut->addHTML( '<table class="mw-datatable TablePager" style="width: 100%"><tr>' );
4040 foreach( array( 'wiki', 'by', 'timestamp', 'dispreason' ) as $column )
4141 $wgOut->addHTML( '<th>' . wfMsgExt( "closewikis-list-header-{$column}", 'parseinline' ) . '</th>' );
4242 $wgOut->addHTML( '</tr>' );
Index: trunk/extensions/SecurePoll/includes/pages/TranslatePage.php
@@ -68,7 +68,7 @@
6969 $action = $this->getTitle( $secondary )->getLocalUrl( 'action=submit' );
7070 $s =
7171 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action ) ) .
72 - '<table class="TablePager securepoll-trans-table">' .
 72+ '<table class="mw-datatable TablePager securepoll-trans-table">' .
7373 '<col class="securepoll-col-trans-id" width="1*"/>' .
7474 '<col class="securepoll-col-primary" width="30%"/>' .
7575 '<col class="securepoll-col-secondary"/>' .
Index: trunk/extensions/SecurePoll/includes/pages/DetailsPage.php
@@ -50,7 +50,7 @@
5151 'securepoll-details-title', $this->voteId ) );
5252
5353 $wgOut->addHTML(
54 - '<table class="TablePager">' .
 54+ '<table class="mw-datatable TablePager">' .
5555 $this->detailEntry( 'securepoll-header-id', $row->vote_id ) .
5656 $this->detailEntry( 'securepoll-header-timestamp', $row->vote_timestamp ) .
5757 $this->detailEntry( 'securepoll-header-voter-name', $row->voter_name ) .
@@ -66,7 +66,7 @@
6767
6868 # Show voter properties
6969 $wgOut->addHTML( '<h2>' . wfMsgHTML( 'securepoll-voter-properties' ) . "</h2>\n" );
70 - $wgOut->addHTML( '<table class="TablePager">' );
 70+ $wgOut->addHTML( '<table class="mw-datatable TablePager">' );
7171 $props = SecurePoll_Voter::decodeProperties( $row->voter_properties );
7272 foreach ( $props as $name => $value ) {
7373 if ( is_array( $value ) ) {
@@ -89,7 +89,7 @@
9090 $res = $db->query( $sql, __METHOD__ );
9191 if ( $res->numRows() ) {
9292 $wgOut->addHTML( '<h2>' . wfMsgHTML( 'securepoll-cookie-dup-list' ) . '</h2>' );
93 - $wgOut->addHTML( '<table class="TablePager">' );
 93+ $wgOut->addHTML( '<table class="mw-datatable TablePager">' );
9494 foreach ( $res as $row ) {
9595 $voter = $this->context->getVoter( $row->voter );
9696 $wgOut->addHTML(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95960Split up TablePager css class, introduce .mw-datatable...krinkle10:38, 1 September 2011

Status & tagging log