r47299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47298‎ | r47299 | r47300 >
Date:21:25, 15 February 2009
Author:raymond
Status:resolved (Comments)
Tags:
Comment:
* Special:Prefixindex: Move table styling to shared.css
* Add CSS IDs to tables
* Use correct message 'allpagesprefix' for input form label
* Replace _ with ' ' in next page link
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPrefixindex.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/modern/rtl.css (modified) (history)
  • /trunk/phase3/skins/monobook/rtl.css (modified) (history)
  • /trunk/phase3/skins/simple/rtl.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/rtl.css
@@ -239,3 +239,8 @@
240240 html > body div#bodyContent ul#filetoc {
241241 display: block;
242242 }
 243+/* Special:Prefixindex styling */
 244+td#mw-prefixindex-nav-form {
 245+ text-align: left;
 246+}
 247+
Index: trunk/phase3/skins/modern/rtl.css
@@ -151,3 +151,9 @@
152152 html > body div#mw_contentholder ul#filetoc {
153153 display: block;
154154 }
 155+
 156+/* Special:Prefixindex styling */
 157+td#mw-prefixindex-nav-form {
 158+ text-align: left;
 159+}
 160+
Index: trunk/phase3/skins/common/shared.css
@@ -297,6 +297,19 @@
298298 font-weight: bold;
299299 }
300300
 301+/* Special:Prefixindex styling */
 302+table#mw-prefixindex-list-table,
 303+table#mw-prefixindex-nav-table {
 304+ width: 98%;
 305+ background-color: transparent;
 306+}
 307+td#mw-prefixindex-nav-form {
 308+ font-size: smaller;
 309+ margin-bottom: 1em;
 310+ text-align: right;
 311+ vertical-align: top;
 312+}
 313+
301314 /*
302315 * Recreating deleted page warning
303316 * Reupload file warning
Index: trunk/phase3/skins/simple/rtl.css
@@ -174,3 +174,8 @@
175175 html > body div#bodyContent ul {
176176 display: table;
177177 }
 178+/* Special:Prefixindex styling */
 179+td#mw-prefixindex-nav-form {
 180+ text-align: left;
 181+}
 182+
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1463,7 +1463,7 @@
14641464 * to ensure that client-side caches don't keep obsolete copies of global
14651465 * styles.
14661466 */
1467 -$wgStyleVersion = '205';
 1467+$wgStyleVersion = '206';
14681468
14691469
14701470 # Server-side caching:
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php
@@ -6,9 +6,6 @@
77 */
88 class SpecialPrefixindex extends SpecialAllpages {
99 // Inherit $maxPerPage
10 -
11 - // Define other properties
12 - protected $nsfromMsg = 'allpagesprefix';
1310
1411 function __construct(){
1512 parent::__construct( 'Prefixindex' );
@@ -63,7 +60,7 @@
6461 $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
6562 $out .= "<tr>
6663 <td class='mw-label'>" .
67 - Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) .
 64+ Xml::label( wfMsg( 'allpagesprefix' ), 'nsfrom' ) .
6865 "</td>
6966 <td class='mw-input'>" .
7067 Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) .
@@ -99,7 +96,6 @@
10097 $fromList = $this->getNamespaceKeyAndText($namespace, $from);
10198 $prefixList = $this->getNamespaceKeyAndText($namespace, $prefix);
10299 $namespaces = $wgContLang->getNamespaces();
103 - $align = $wgContLang->isRtl() ? 'left' : 'right';
104100
105101 if ( !$prefixList || !$fromList ) {
106102 $out = wfMsgWikiHtml( 'allpagesbadtitle' );
@@ -134,7 +130,7 @@
135131
136132 $n = 0;
137133 if( $res->numRows() > 0 ) {
138 - $out = '<table style="background: inherit;" border="0" width="100%">';
 134+ $out = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-list-table' ) );
139135
140136 while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
141137 $t = Title::makeTitle( $s->page_namespace, $s->page_title );
@@ -157,7 +153,7 @@
158154 if( ($n % 3) != 0 ) {
159155 $out .= '</tr>';
160156 }
161 - $out .= '</table>';
 157+ $out .= Xml::closeElement( 'table' );
162158 } else {
163159 $out = '';
164160 }
@@ -168,23 +164,27 @@
169165 } else {
170166 $nsForm = $this->namespacePrefixForm( $namespace, $prefix );
171167 $self = $this->getTitle();
172 - $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
173 - $out2 .= '<tr valign="top"><td>' . $nsForm;
174 - $out2 .= '</td><td align="' . $align . '" style="font-size: smaller; margin-bottom: 1em;">' .
175 - $sk->makeKnownLinkObj( $self,
176 - wfMsg ( 'allpages' ) );
 168+ $out2 = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-nav-table' ) ) .
 169+ '<tr>
 170+ <td>' .
 171+ $nsForm .
 172+ '</td>
 173+ <td id="mw-prefixindex-nav-form">' .
 174+ $sk->makeKnownLinkObj( $self, wfMsg ( 'allpages' ) );
 175+
177176 if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
178177 $namespaceparam = $namespace ? "&namespace=$namespace" : "";
179178 $out2 = $wgLang->pipeList( array(
180179 $out2,
181180 $sk->makeKnownLinkObj(
182181 $self,
183 - wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ),
 182+ wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ),
184183 "from=" . wfUrlEncode( $s->page_title ) .
185184 "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam )
186185 ) );
187186 }
188 - $out2 .= "</td></tr></table>";
 187+ $out2 .= "</td></tr>" .
 188+ Xml::closeElement( 'table' );
189189 }
190190
191191 $wgOut->addHTML( $out2 . $out );
Index: trunk/phase3/RELEASE-NOTES
@@ -174,6 +174,9 @@
175175 maintenance/cleanupWatchlist.php
176176 * (bug 17488) RSS/Atom links in left toolbar are now localized
177177 * (bug 17472) use print <<<EOF in maintenance/importTextFile.php
 178+* Special:PrefixIndex: Move table styling to shared.css, add CSS IDs to tables
 179+ use correct message 'allpagesprefix' for input form label, replace _ with ' '
 180+ in next page link
178181
179182 == API changes in 1.15 ==
180183 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r47601Fix parserTest per comment in r47299raymond09:01, 21 February 2009

Comments

#Comment by Simetrical (talk | contribs)   14:21, 20 February 2009

git bisect reports that this revision introduced two parsertest failures that remain in trunk:

Special page transclusion Special page transclusion twice (bug 5021)

#Comment by Raymond (talk | contribs)   09:01, 21 February 2009

Fixed in r47601.

Status & tagging log