r66437 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66436‎ | r66437 | r66438 >
Date:20:10, 14 May 2010
Author:aaron
Status:ok
Tags:
Comment:
* Removed bogus newline for bar UI
* Replaced ugly whitespace with margin
* Renamed mw-fr-revisionratings -> mw-fr-revisiondetails
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsXML.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/client/flaggedrevs.css (modified) (history)
  • /trunk/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php
@@ -298,8 +298,8 @@
299299 $box .= '<div style="position:relative;">'; // for rel-absolute child div
300300 $box .= Xml::openElement( 'div',
301301 array(
302 - 'id' => 'mw-fr-revisionratings',
303 - 'class' => 'flaggedrevs_short_details',
 302+ 'id' => 'mw-fr-revisiondetails',
 303+ 'class' => 'flaggedrevs_short_details',
304304 )
305305 );
306306 $box .= $html; // details text
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.css
@@ -192,6 +192,7 @@
193193 font-family: monospace;
194194 font-weight: bold;
195195 cursor: pointer;
 196+ margin: 0 .3em 0 .3em;
196197 }
197198
198199 a.fr-toggle-text {
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -19,7 +19,7 @@
2020 var toggle = document.getElementById('mw-fr-revisiontoggle');
2121 if( toggle ) {
2222 toggle.style.display = 'inline';
23 - var ratings = document.getElementById('mw-fr-revisionratings');
 23+ var ratings = document.getElementById('mw-fr-revisiondetails');
2424 if( ratings ) {
2525 ratings.style.display = 'none';
2626 }
@@ -46,7 +46,7 @@
4747
4848 /* Expands flag info box details */
4949 'showBoxDetails': function() {
50 - var ratings = document.getElementById('mw-fr-revisionratings');
 50+ var ratings = document.getElementById('mw-fr-revisiondetails');
5151 if( !ratings ) return;
5252 var toggle = document.getElementById('mw-fr-revisiontoggle');
5353 if( !toggle ) return;
@@ -56,7 +56,7 @@
5757
5858 /* Collapses flag info box details */
5959 'hideBoxDetails': function( event ) {
60 - var ratings = document.getElementById('mw-fr-revisionratings');
 60+ var ratings = document.getElementById('mw-fr-revisiondetails');
6161 if( !ratings ) return;
6262 var toggle = document.getElementById('mw-fr-revisiontoggle');
6363 if( !toggle ) return;
@@ -66,7 +66,7 @@
6767
6868 /* Toggles flag info box details */
6969 'toggleBoxDetails': function() {
70 - var ratings = document.getElementById('mw-fr-revisionratings');
 70+ var ratings = document.getElementById('mw-fr-revisiondetails');
7171 if( !ratings ) return;
7272 // Collapsed -> expand
7373 if( ratings.style.display == 'none' ) {
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -159,10 +159,10 @@
160160 $tag = wfMsgExt( $msg, array( 'parseinline' ), $frev->getRevId(), $time );
161161 # Hide clutter
162162 if ( !FlaggedRevs::useSimpleUI() && !empty( $flags ) ) {
163 - $tag .= " " . FlaggedRevsXML::ratingToggle() .
164 - "<span id='mw-fr-revisionratings' style='display:block;'><br />" .
 163+ $tag .= FlaggedRevsXML::ratingToggle() .
 164+ "<div id='mw-fr-revisiondetails' style='display:block;'>" .
165165 wfMsgHtml( 'revreview-oldrating' ) .
166 - FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 166+ FlaggedRevsXML::addTagRatings( $flags ) . '</div>';
167167 }
168168 $css = 'flaggedrevs_notice plainlinks noprint';
169169 $tag = "<div id='mw-fr-revisiontag-old' class='$css'>$tag</div>";
@@ -487,14 +487,14 @@
488488 $msg = $quality
489489 ? 'revreview-quality-old'
490490 : 'revreview-basic-old';
491 - $tag = $prot . $icon .
492 - wfMsgExt( $msg, array( 'parseinline' ), $frev->getRevId(), $time );
 491+ $tag = $prot . $icon;
 492+ $tag .= wfMsgExt( $msg, 'parseinline', $frev->getRevId(), $time );
493493 # Hide clutter
494494 if ( !empty( $flags ) ) {
495 - $tag .= " " . FlaggedRevsXML::ratingToggle();
496 - $tag .= "<span id='mw-fr-revisionratings' style='display:block;'><br />" .
 495+ $tag .= FlaggedRevsXML::ratingToggle();
 496+ $tag .= "<div id='mw-fr-revisiondetails' style='display:block;'>" .
497497 wfMsgHtml( 'revreview-oldrating' ) .
498 - FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 498+ FlaggedRevsXML::addTagRatings( $flags ) . '</div>';
499499 }
500500 }
501501 }
@@ -574,12 +574,12 @@
575575 # uses messages 'revreview-quality-i', 'revreview-basic-i'
576576 $msg .= '-i';
577577 }
578 - $tag = $prot . $icon .
579 - wfMsgExt( $msg, array( 'parseinline' ), $srev->getRevId(), $time, $revsSince );
 578+ $tag = $prot . $icon;
 579+ $tag .= wfMsgExt( $msg, 'parseinline', $srev->getRevId(), $time, $revsSince );
580580 if ( !empty( $flags ) ) {
581 - $tag .= " " . FlaggedRevsXML::ratingToggle();
582 - $tag .= "<span id='mw-fr-revisionratings' style='display:block;'><br />" .
583 - FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 581+ $tag .= FlaggedRevsXML::ratingToggle();
 582+ $tag .= "<div id='mw-fr-revisiondetails' style='display:block;'>" .
 583+ FlaggedRevsXML::addTagRatings( $flags ) . '</div>';
584584 }
585585 }
586586 }

Status & tagging log