r52124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52123‎ | r52124 | r52125 >
Date:17:03, 18 June 2009
Author:aaron
Status:resolved
Tags:
Comment:
(bug 19192) Make review failure more obvious in UI
Modified paths:
  • /trunk/extensions/FlaggedRevs/flaggedrevs.js (modified) (history)
  • /trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php
@@ -145,8 +145,9 @@
146146 'revreview-style-3' => 'Concise',
147147 'revreview-style-4' => 'Featured',
148148 'revreview-submit' => 'Submit',
149 - 'revreview-submitting' => 'Submitting …',
 149+ 'revreview-submitting' => 'Submitting...',
150150 'revreview-finished' => 'Review complete!',
 151+ 'revreview-failed' => 'Review failed!',
151152 'revreview-successful' => '\'\'\'Revision of [[:$1|$1]] successfully flagged. ([{{fullurl:Special:Stableversions|page=$2}} view stable versions])\'\'\'',
152153 'revreview-successful2' => '\'\'\'Revision of [[:$1|$1]] successfully unflagged.\'\'\'',
153154 'revreview-text' => '\'\'[[{{MediaWiki:Validationpage}}|Stable versions]] are the default page content for viewers rather than the newest revision.\'\'',
Index: trunk/extensions/FlaggedRevs/flaggedrevs.js
@@ -234,7 +234,8 @@
235235 if( typeof wgAjaxReview === "undefined" || !wgAjaxReview ) {
236236 wgAjaxReview = {
237237 sendingMsg: "Submitting...",
238 - sentMsg: "Submitted",
 238+ sentMsgOk: "Review complete!",
 239+ sentMsgBad: "Review failed!",
239240 actioncomplete: "Action complete",
240241 actionfailed: "Action failed"
241242 };
@@ -336,9 +337,11 @@
337338 return;
338339 }
339340 var response = request.responseText;
 341+ var success = false;
340342 if( msg = response.substr(6) ) {
341343 jsMsg( msg, 'review' );
342344 window.scroll(0,0);
 345+ success = true;
343346 }
344347 wgAjaxReview.inprogress = false;
345348 if( wgAjaxReview.timeoutID ) {
@@ -346,7 +349,10 @@
347350 }
348351 var submit = document.getElementById("submitreview");
349352 if( submit ) {
350 - submit.value = wgAjaxReview.sentMsg;
 353+ if( success )
 354+ submit.value = wgAjaxReview.sentMsgOk;
 355+ else
 356+ submit.value = wgAjaxReview.sentMsgBad;
351357 }
352358 if( response.indexOf('<suc#>') == 0 ) {
353359 wgAjaxReview.unlockForm();

Follow-up revisions

RevisionCommit summaryAuthorDate
r52136Added change I forgot to commit in r52124aaron17:58, 18 June 2009

Status & tagging log