r90418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90417‎ | r90418 | r90419 >
Date:20:31, 19 June 2011
Author:aaron
Status:ok
Tags:
Comment:
* Clarified revreview-reject-text-list
* Prettified review form HTML with newlines a bit
* Added JS hack to updateRatingFormColors() to fix FF jitter bug
* Removed unused revreview-update-use msg
Modified paths:
  • /trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/presentation/RejectConfirmationFormUI.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/presentation/modules/review.js (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php
@@ -78,10 +78,9 @@
7979
8080 Please review all the changes shown below to make your edits appear in the stable version.',
8181 'revreview-update-includes' => '\'\'\'Templates/files updated (unreviewed pages in bold):\'\'\'',
82 - 'revreview-update-use' => '\'\'\'NOTE:\'\'\' The stable version of each of these templates/files is used in the stable version of this page.',
8382
8483 'revreview-reject-header' => 'Reject changes for $1',
85 - 'revreview-reject-text-list' => 'By completing this action, you will be \'\'\'rejecting\'\'\' the following {{PLURAL:$1|change|changes}}:',
 84+ 'revreview-reject-text-list' => 'By completing this action you will be \'\'\'rejecting\'\'\' the source text changes from the following {{PLURAL:$1|revision|revisions}} of [[:$2|$2]]:',
8685 'revreview-reject-text-revto' => 'This will revert the page back to the [{{fullurl:$1|oldid=$2}} version as of $3].',
8786 'revreview-reject-summary' => 'Summary:',
8887 'revreview-reject-confirm' => 'Reject these changes',
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php
@@ -1409,15 +1409,9 @@
14101410 }
14111411 # Add include change list...
14121412 if ( count( $changeList ) ) { // just inclusion changes
1413 - $changeDiv .= '<p>' .
 1413+ $changeDiv .= "<p>" .
14141414 wfMsgExt( 'revreview-update-includes', 'parseinline' ) .
1415 - '&#160;' . implode( ', ', $changeList ) . '</p>';
1416 - # Add include usage notice...
1417 - /*
1418 - if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_STABLE ) {
1419 - $changeDiv .= wfMsgExt( 'revreview-update-use', 'parse' );
1420 - }
1421 - */
 1415+ '&#160;' . implode( ', ', $changeList ) . "</p>\n";
14221416 }
14231417 }
14241418 if ( $changeDiv != '' ) {
Index: trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php
@@ -104,9 +104,9 @@
105105 $reviewTitle = SpecialPage::getTitleFor( 'RevisionReview' );
106106 $action = $reviewTitle->getLocalUrl( 'action=submit' );
107107 $params = array( 'method' => 'post', 'action' => $action, 'id' => 'mw-fr-reviewform' );
108 - $form = Xml::openElement( 'form', $params );
 108+ $form = Xml::openElement( 'form', $params ) . "\n";
109109 $form .= Xml::openElement( 'fieldset',
110 - array( 'class' => 'flaggedrevs_reviewform noprint' ) );
 110+ array( 'class' => 'flaggedrevs_reviewform noprint' ) ) . "\n";
111111 # Add appropriate legend text
112112 $legendMsg = $frev ? 'revreview-reflag' : 'revreview-flag';
113113 $form .= Xml::openElement( 'legend', array( 'id' => 'mw-fr-reviewformlegend' ) );
@@ -136,22 +136,22 @@
137137 $form .= wfMsgExt( $msg, 'parseinline',
138138 $wgLang->date( $ts, true ), $wgLang->time( $ts, true ) );
139139 }
140 - $form .= '</span></p>';
 140+ $form .= "</span></p>\n";
141141 }
142142
143143 if ( $disabled ) {
144144 $form .= Xml::openElement( 'div', array( 'class' => 'fr-rating-controls-disabled',
145 - 'id' => 'fr-rating-controls-disabled' ) );
 145+ 'id' => 'fr-rating-controls-disabled' ) ) . "\n";
146146 } else {
147147 $form .= Xml::openElement( 'div', array( 'class' => 'fr-rating-controls',
148 - 'id' => 'fr-rating-controls' ) );
 148+ 'id' => 'fr-rating-controls' ) ) . "\n";
149149 }
150150
151151 # Add main checkboxes/selects
152152 $form .= Xml::openElement( 'span',
153 - array( 'id' => 'mw-fr-ratingselects', 'class' => 'fr-rating-options' ) );
 153+ array( 'id' => 'mw-fr-ratingselects', 'class' => 'fr-rating-options' ) ) . "\n";
154154 $form .= self::ratingInputs( $this->user, $flags, (bool)$disabled, (bool)$frev );
155 - $form .= Xml::closeElement( 'span' );
 155+ $form .= Xml::closeElement( 'span' ) . "\n";
156156
157157 # Get template/file version info as needed
158158 list( $templateIDs, $imageSHA1Keys ) = $this->getIncludeVersions();
@@ -159,7 +159,8 @@
160160 list( $templateParams, $imageParams, $fileVersion ) =
161161 RevisionReviewForm::getIncludeParams( $article, $templateIDs, $imageSHA1Keys );
162162
163 - $form .= Xml::openElement( 'span', array( 'style' => 'white-space: nowrap;' ) );
 163+ $form .= Xml::openElement( 'span',
 164+ array( 'style' => 'white-space: nowrap;' ) ) . "\n";
164165 # Hide comment input if needed
165166 if ( !$disabled ) {
166167 if ( count( FlaggedRevs::getTags() ) > 1 ) {
@@ -181,7 +182,7 @@
182183 if ( $article->isPageLocked() ) {
183184 $form .= ' ' . FlaggedRevsXML::logToggle( 'revreview-log-toggle-show' );
184185 }
185 - $form .= Xml::closeElement( 'span' );
 186+ $form .= Xml::closeElement( 'span' ) . "\n";;
186187 # ..add the actual stability log body here
187188 if ( $article->isPageLocked() ) {
188189 $form .= FlaggedRevsXML::stabilityLogExcerpt( $article );
@@ -206,8 +207,8 @@
207208 );
208209 $form .= Html::hidden( 'validatedParams', $checkCode ) . "\n";
209210
210 - $form .= Xml::closeElement( 'fieldset' );
211 - $form .= Xml::closeElement( 'form' );
 211+ $form .= Xml::closeElement( 'fieldset' ) . "\n";
 212+ $form .= Xml::closeElement( 'form' ) . "\n";
212213
213214 return array( $form, true /* ok */ );
214215 }
Index: trunk/extensions/FlaggedRevs/presentation/modules/review.js
@@ -78,6 +78,9 @@
7979 selectedlevel = levels[0].selectedIndex;
8080 value = levels[0].getElementsByTagName('option')[selectedlevel].value;
8181 levels[0].className = 'fr-rating-option-' + value;
 82+ // Fix FF one-time jitter bug of changing an <option>
 83+ levels[0].selectedIndex = null;
 84+ levels[0].selectedIndex = selectedlevel;
8285 }
8386 }
8487 },
Index: trunk/extensions/FlaggedRevs/presentation/RejectConfirmationFormUI.php
@@ -62,7 +62,7 @@
6363
6464 // List of revisions being undone...
6565 $form .= wfMsgExt( 'revreview-reject-text-list', 'parseinline',
66 - $wgLang->formatNum( count( $rejectIds ) ) );
 66+ $wgLang->formatNum( count( $rejectIds ) ), $oldRev->getTitle()->getPrefixedText() );
6767 $form .= '<ul>';
6868 // FIXME: we need a generic revision list class...this is bullshit
6969 $spRevDelete = SpecialPage::getPage( 'RevisionReview' );

Status & tagging log