r96406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96405‎ | r96406 | r96407 >
Date:05:23, 7 September 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
Per Krinke on r91772, do not use general float/align classes. I removed them in shared.css because they are recent and not widely used yet.
(I removed the vertical-align:bottom; because it is added by css for .collection-creatorbox-row img)
Modified paths:
  • /trunk/extensions/Collection/Collection.hooks.php (modified) (history)
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)
  • /trunk/extensions/Collection/js/bookcreator.css (modified) (history)
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -52,11 +52,6 @@
5353 direction: rtl;
5454 }
5555
56 -.mw-float-start { float: left; }
57 -.mw-float-end { float: right; }
58 -.mw-align-start { text-align: left; }
59 -.mw-align-end { text-align: right; }
60 -
6156 /* The scripts of these languages are very hard to read with underlines */
6257 [lang="ar"] a,
6358 [lang="ckb"] a,
@@ -406,6 +401,10 @@
407402 border: 1px dashed #aaa;
408403 }
409404
 405+.mw-history-revisiondelete-button, #mw-fileduplicatesearch-icon {
 406+ float: right;
 407+}
 408+
410409 /** Generic minor/bot/newpage styling (recent changes) */
411410 .newpage,
412411 .minor,
Index: trunk/phase3/includes/HistoryPage.php
@@ -420,7 +420,7 @@
421421 'type' => 'submit',
422422 'name' => $name,
423423 'value' => '1',
424 - 'class' => "mw-history-$name-button mw-float-end",
 424+ 'class' => "mw-history-$name-button",
425425 ),
426426 wfMsg( $msg )
427427 ) . "\n";
Index: trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php
@@ -130,7 +130,7 @@
131131 if ( $img ) {
132132 $thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) );
133133 if( $thumb ) {
134 - $out->addHTML( '<div class="mw-float-end" id="mw-fileduplicatesearch-icon">' .
 134+ $out->addHTML( '<div id="mw-fileduplicatesearch-icon">' .
135135 $thumb->toHtml( array( 'desc-link' => false ) ) . '<br />' .
136136 wfMsgExt( 'fileduplicatesearch-info', array( 'parse' ),
137137 $this->getLang()->formatNum( $img->getWidth() ),
Index: trunk/extensions/Collection/Collection.hooks.php
@@ -261,7 +261,7 @@
262262 'alt' => '',
263263 'width' => '80',
264264 'height' => '45',
265 - 'class' => 'mw-float-start collection-creatorbox-book',
 265+ 'class' => 'collection-creatorbox-book',
266266 ),
267267 '',
268268 true
@@ -269,8 +269,7 @@
270270
271271 $html .= Xml::tags( 'div',
272272 array( 'class' => 'collection-creatorbox-row' ),
273 - Xml::tags( 'div',
274 - array( 'class' => 'mw-float-end' ),
 273+ Xml::tags( 'div', null,
275274 Linker::link(
276275 Title::newFromText( wfMsg( 'coll-helppage' ) ),
277276 Xml::element( 'img',
@@ -279,7 +278,6 @@
280279 'alt' => '',
281280 'width' => '16',
282281 'height' => '16',
283 - 'style' => 'vertical-align: text-bottom;',
284282 )
285283 )
286284 . '&#160;' . wfMsgHtml( 'coll-help' ),
Index: trunk/extensions/Collection/js/bookcreator.css
@@ -13,6 +13,7 @@
1414 */
1515
1616 .collection-column {
 17+ float: left;
1718 width: 47%;
1819 }
1920
@@ -116,6 +117,10 @@
117118 margin-bottom: 0;
118119 }
119120
 121+.collection-creatorbox-book {
 122+ float: left;
 123+}
 124+
120125 /* Trivial but nicer for the browsers that support it */
121126 .rtl .collection-creatorbox-book {
122127 --ms-transform: scaleX(-1);
@@ -134,6 +139,18 @@
135140 margin-left: 10px;
136141 }
137142
 143+.collection-creatorbox-row div {
 144+ float: right;
 145+}
 146+
138147 .collection-creatorbox-row img {
139148 vertical-align: text-bottom;
140 -}
\ No newline at end of file
 149+}
 150+
 151+#collection-suggest-add,
 152+#collection-order-button,
 153+#collection-download-button,
 154+#collection-save-button,
 155+#collection-save-input {
 156+ float: right;
 157+}
Index: trunk/extensions/Collection/Collection.templates.php
@@ -15,7 +15,7 @@
1616 $mediapath = $GLOBALS['wgExtensionAssetsPath'] . '/Collection/images/';
1717 ?>
1818
19 -<div class="mw-float-start collection-column collection-column-left">
 19+<div class="collection-column collection-column-left">
2020
2121 <form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post" id="mw-collection-title-form">
2222 <table id="mw-collection-title-table" style="width: 80%; background-color: transparent;" align="center">
@@ -51,7 +51,7 @@
5252
5353 </div>
5454
55 -<div class="mw-float-start collection-column collection-column-right">
 55+<div class="collection-column collection-column-right">
5656
5757 <div class="collection-column-right-box" id="coll-orderbox">
5858 <h2><span class="mw-headline"><?php $this->msg( 'coll-book_title' ) ?></span></h2>
@@ -60,7 +60,7 @@
6161 $this->msgWiki( 'coll-book_text' );
6262 ?>
6363 <div>
64 - <div class="mw-float-end">
 64+ <div id="collection-order-button">
6565 <form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
6666 <input type="hidden" name="bookcmd" value="post_zip" />
6767 <input type="hidden" name="partner" value="pediapress" />
@@ -112,7 +112,7 @@
113113 <?php } ?>
114114 </select>
115115 <?php } ?>
116 - </td><td class="mw-align-end" style="vertical-align:bottom;">
 116+ </td><td id="collection-download-button">
117117 <input type="hidden" name="bookcmd" value="render" />
118118 <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> />
119119 </td></tr></tbody></table>
@@ -146,7 +146,7 @@
147147 <?php } ?>
148148 <label for="personalCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['user-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['user-book-prefix'] ) ?></a></label>
149149 </td>
150 - <td class="mw-align-end">
 150+ <td id="collection-save-input">
151151 <input id="personalCollTitle" type="text" name="pcollname" />
152152 </td></tr>
153153 <?php } // if ($canSaveUserPage) ?>
@@ -159,11 +159,11 @@
160160 <?php } ?>
161161 <label for="communityCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['community-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['community-book-prefix'] ) ?></a></label>
162162 </td>
163 - <td class="mw-align-end">
 163+ <td id="collection-save-button">
164164 <input id="communityCollTitle" type="text" name="ccollname" disabled="disabled" />
165165 </td></tr>
166166 <?php } // if ($canSaveCommunityPage) ?>
167 - <tr><td>&#160;</td><td class="mw-align-end">
 167+ <tr><td>&#160;</td><td id="collection-save-button">
168168 <input id="saveButton" type="submit" value="<?php $this->msg( 'coll-save_collection' ) ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> />
169169 </tr></tbody></table>
170170 <input name="token" type="hidden" value="<?php echo htmlspecialchars( $GLOBALS['wgUser']->editToken() ) ?>" />
@@ -418,7 +418,7 @@
419419 (<a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'resetbans' => '1' ) ) ) ?>" title="<?php $this->msg( 'coll-suggest_reset_bans_tooltip' ) ?>"><?php $this->msg( 'coll-suggest_reset_bans' ) ?></a>)
420420 <?php if ( count( $this->data['proposals'] ) > 0 ) { ?>
421421 <noscript>
422 - <div class="mw-float-end">
 422+ <div id="collection-suggest-add">
423423 <input type="submit" value="<?php $this->msg( 'coll-suggest_add_selected' ) ?>" name="addselected" />
424424 </div>
425425 </noscript>

Sign-offs

UserFlagDate
Krinkleinspected01:06, 8 September 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r97271REL1_18 MFT r96406reedy14:12, 16 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91772Inline CSS is bad in itself and bad for RTL support (why was there even a mes...robin01:03, 9 July 2011

Comments

#Comment by Krinkle (talk | contribs)   01:14, 8 September 2011

Core changes look good on my local install. I don't have Collection though. Will check that later.

Status & tagging log