r95961 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95960‎ | r95961 | r95962 >
Date:10:50, 1 September 2011
Author:krinkle
Status:ok
Tags:
Comment:
* addModuleStyles instead of addModule, support noscript-env
* Strict comparison
* Fix usage non-semantic TablePager with mw-data (Introduced in r95960, see r95818 CR)

Follows-up r95818 (Fixes fixme)
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/SpecialGadgetManager.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.css (deleted) (history)
  • /branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.prejs.css (added) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/SpecialGadgetManager.php
@@ -20,7 +20,7 @@
2121
2222 $this->setHeaders();
2323 $out->setPagetitle( wfMsg( 'gadgetmanager-title' ) );
24 - $out->addModules( 'ext.gadgets.gadgetmanager' );
 24+ $out->addModuleStyles( 'ext.gadgets.gadgetmanager.prejs' );
2525
2626 // Determine view
2727 if ( is_string( $par ) && $par !== '' ) {
@@ -69,7 +69,7 @@
7070 foreach ( $gadgetsByCategory as $category => $gadgets ) {
7171 // Avoid broken or empty headings. Fallback to a special message
7272 // for uncategorized gadgets (e.g. gadgets with category '' ).
73 - if ( $category != '' ) {
 73+ if ( $category !== '' ) {
7474 $categoryMsg = wfMessage( "gadgetcategory-$category" );
7575 } else {
7676 $categoryMsg = wfMessage( 'gadgetmanager-uncategorized' );
@@ -82,7 +82,7 @@
8383 );
8484
8585 // Start per-category gadgets table
86 - $html .= '<table class="mw-gadgetmanager-gadgets TablePager"><tr>';
 86+ $html .= '<table class="mw-gadgetmanager-gadgets mw-datatable"><tr>';
8787 $html .=
8888 '<th>' . wfMessage( 'gadgetmanager-tablehead-title' )->escaped()
8989 . '</th><th>' . wfMessage( 'gadgetmanager-tablehead-default' )->escaped()
Index: branches/RL2/extensions/Gadgets/Gadgets.php
@@ -141,8 +141,9 @@
142142 'remoteExtPath' => 'Gadgets/modules'
143143 );
144144 $wgResourceModules += array(
145 - 'ext.gadgets.gadgetmanager' => $gadResourceTemplate + array(
146 - 'styles' => 'ext.gadgets.gadgetmanager.css',
 145+ // Also loaded in if javascript disabled
 146+ 'ext.gadgets.gadgetmanager.prejs' => $gadResourceTemplate + array(
 147+ 'styles' => 'ext.gadgets.gadgetmanager.prejs.css',
147148 'position' => 'top',
148 - )
 149+ ),
149150 );
Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.css
@@ -1,10 +0,0 @@
2 -.mw-gadgetmanager-gadgets {
3 - width: 100%;
4 -}
5 -
6 -.mw-gadgetmanager-gadgets-default,
7 -.mw-gadgetmanager-gadgets-hidden,
8 -.mw-gadgetmanager-gadgets-shared {
9 - width: 4em;
10 - text-align: center;
11 -}
Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.prejs.css
@@ -0,0 +1,10 @@
 2+.mw-gadgetmanager-gadgets {
 3+ width: 100%;
 4+}
 5+
 6+.mw-gadgetmanager-gadgets-default,
 7+.mw-gadgetmanager-gadgets-hidden,
 8+.mw-gadgetmanager-gadgets-shared {
 9+ width: 4em;
 10+ text-align: center;
 11+}
Property changes on: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.prejs.css
___________________________________________________________________
Added: svn:eol-style
112 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95818[ResourceLoader2]: Initial go at the GadgetManager....krinkle22:25, 30 August 2011
r95960Split up TablePager css class, introduce .mw-datatable...krinkle10:38, 1 September 2011

Status & tagging log