Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | $wgAvailableRights[] = 'stablesettings'; |
309 | 309 | |
310 | 310 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
311 | | -$wgFlaggedRevStyleVersion = 66; |
| 311 | +$wgFlaggedRevStyleVersion = 67; |
312 | 312 | |
313 | 313 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
314 | 314 | |
Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | 'revreview-diff-toggle-hide' => '(hide changes)', |
56 | 56 | 'revreview-diff-toggle-title' => 'Toggle display of changes between draft and the published version', |
57 | 57 | 'revreview-log-toggle-show' => '(show stability log)', |
| 58 | + 'revreview-log-details-show' => '(show details)', |
58 | 59 | 'review-diff2stable' => 'View pending changes to published version', |
59 | 60 | 'review-logentry-app' => 'reviewed a version of [[$1]]', |
60 | 61 | 'review-logentry-dis' => 'deprecated a version of [[$1]]', |
— | — | @@ -162,13 +163,16 @@ |
163 | 164 | 'revreview-style-3' => 'Concise', |
164 | 165 | 'revreview-style-4' => 'Featured', |
165 | 166 | 'revreview-submit' => 'Submit', |
166 | | - 'revreview-submit-review' => 'Mark reviewed', |
167 | | - 'revreview-submit-unreview' => 'Mark unreviewed', |
| 167 | + 'revreview-submit-review' => 'Mark checked', |
| 168 | + 'revreview-submit-unreview' => 'Mark unchecked', |
168 | 169 | 'revreview-submitting' => 'Submitting...', |
| 170 | + 'revreview-submit-reviewed' => 'Done. Checked!', |
| 171 | + 'revreview-submit-unreviewed' => 'Done. Unchecked!', |
169 | 172 | 'revreview-successful' => '\'\'\'Revision of [[:$1|$1]] successfully flagged. ([{{fullurl:{{#Special:ReviewedVersions}}|page=$2}} view reviewed versions])\'\'\'', |
170 | 173 | 'revreview-successful2' => '\'\'\'Revision of [[:$1|$1]] successfully unflagged.\'\'\'', |
171 | 174 | 'revreview-text' => '\'\'[[{{MediaWiki:Validationpage}}|Reviewed versions]] are checked versions of pages used to determine the published version.\'\'', |
172 | | - 'revreview-toggle' => '(+/-)', |
| 175 | + 'revreview-toggle-show' => '(+)', |
| 176 | + 'revreview-toggle-hide' => '(-)', |
173 | 177 | 'revreview-toggle-title' => 'show/hide details', |
174 | 178 | 'revreview-toolow' => '\'\'\'You must rate each of the below attributes higher than "unapproved" in order for a revision to be considered reviewed.\'\'\' |
175 | 179 | To deprecate a revision, set all fields to "unapproved". |
— | — | @@ -236,8 +240,8 @@ |
237 | 241 | 'log-show-hide-review' => '$1 review log', |
238 | 242 | |
239 | 243 | 'revreview-tt-review' => 'Apply this status to this revision', |
240 | | - 'revreview-tt-flag' => 'Mark this revision as reviewed', |
241 | | - 'revreview-tt-unflag' => 'Mark this revision as not reviewed', |
| 244 | + 'revreview-tt-flag' => 'Approve this revision by marking it as checked', |
| 245 | + 'revreview-tt-unflag' => 'De-approve this revision by marking it as unchecked', |
242 | 246 | 'validationpage' => '{{ns:help}}:Page validation', |
243 | 247 | ); |
244 | 248 | |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -257,7 +257,7 @@ |
258 | 258 | return '<a id="mw-fr-revisiontoggle" class="flaggedrevs_toggle" style="display:none;"' . |
259 | 259 | ' onclick="FlaggedRevs.toggleRevRatings()" title="' . |
260 | 260 | wfMsgHtml( 'revreview-toggle-title' ) . '" >' . |
261 | | - wfMsgHtml( 'revreview-toggle' ) . '</a>'; |
| 261 | + wfMsgHtml( 'revreview-toggle-show' ) . '</a>'; |
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |
— | — | @@ -275,11 +275,11 @@ |
276 | 276 | * @returns string |
277 | 277 | * Generates (+/-) JS toggle HTML |
278 | 278 | */ |
279 | | - public static function logToggle() { |
| 279 | + public static function logToggle( $msg ) { |
280 | 280 | return '<a id="mw-fr-logtoggle" class="flaggedrevs_toggle" style="display:none;"' . |
281 | 281 | ' onclick="FlaggedRevs.toggleLog()" title="' . |
282 | | - wfMsgHtml( 'revreview-log-toggle-show' ) . '" >' . |
283 | | - wfMsgHtml( 'revreview-log-toggle-show' ) . '</a>'; |
| 282 | + wfMsgHtml( $msg ) . '" >' . |
| 283 | + wfMsgHtml( $msg ) . '</a>'; |
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -67,7 +67,9 @@ |
68 | 68 | # Set basic messages |
69 | 69 | $msgs = (object) array( |
70 | 70 | 'revreviewDiffToggleShow' => wfMsgHtml( 'revreview-diff-toggle-show' ), |
71 | | - 'revreviewDiffToggleHide' => wfMsgHtml( 'revreview-diff-toggle-hide' ) |
| 71 | + 'revreviewDiffToggleHide' => wfMsgHtml( 'revreview-diff-toggle-hide' ), |
| 72 | + 'revreviewToggleShow' => wfMsgHtml( 'revreview-toggle-show'), |
| 73 | + 'revreviewToggleHide' => wfMsgHtml( 'revreview-toggle-hide') |
72 | 74 | ); |
73 | 75 | $head .= "\n<script type=\"{$wgJsMimeType}\">" . |
74 | 76 | "FlaggedRevs.messages = " . Xml::encodeJsVar( $msgs ) . ";</script>\n"; |
— | — | @@ -97,6 +99,8 @@ |
98 | 100 | 'unflagMsg' => wfMsgHtml( 'revreview-submit-unreview' ), |
99 | 101 | 'flagLegMsg' => wfMsgHtml( 'revreview-flag' ), |
100 | 102 | 'sendingMsg' => wfMsgHtml( 'revreview-submitting' ), |
| 103 | + 'flaggedMsg' => wfMsgHtml( 'revreview-submit-reviewed' ), |
| 104 | + 'unflaggedMsg' => wfMsgHtml( 'revreview-submit-unreviewed' ), |
101 | 105 | 'actioncomplete' => wfMsgHtml( 'actioncomplete' ), |
102 | 106 | 'actionfailed' => wfMsgHtml( 'actionfailed' ), |
103 | 107 | 'draftRev' => wfMsgHtml( 'revreview-hist-draft' ), |
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -5,7 +5,9 @@ |
6 | 6 | var FlaggedRevs = { |
7 | 7 | 'messages': { |
8 | 8 | 'revreviewDiffToggleShow': '(show)', |
9 | | - 'revreviewDiffToggleHide': '(hide)' |
| 9 | + 'revreviewDiffToggleHide': '(hide)', |
| 10 | + 'revreviewToggleShow' : '(+)', |
| 11 | + 'revreviewToggleHide' : '(-)' |
10 | 12 | }, |
11 | 13 | /* Hide rating/diff clutter */ |
12 | 14 | 'enableShowhide': function() { |
— | — | @@ -39,10 +41,14 @@ |
40 | 42 | 'toggleRevRatings': function() { |
41 | 43 | var ratings = document.getElementById('mw-fr-revisionratings'); |
42 | 44 | if( !ratings ) return; |
| 45 | + var toggle = document.getElementById('mw-fr-revisiontoggle'); |
| 46 | + if( !toggle ) return; |
43 | 47 | if( ratings.style.display == 'none' ) { |
44 | 48 | ratings.style.display = 'inline'; |
| 49 | + toggle.innerHTML = this.messages.revreviewToggleHide; |
45 | 50 | } else { |
46 | 51 | ratings.style.display = 'none'; |
| 52 | + toggle.innerHTML = this.messages.revreviewToggleShow; |
47 | 53 | } |
48 | 54 | }, |
49 | 55 | |
— | — | @@ -51,16 +57,13 @@ |
52 | 58 | var diff = document.getElementById('mw-fr-stablediff'); |
53 | 59 | if( !diff ) return; |
54 | 60 | var toggle = document.getElementById('mw-fr-difftoggle'); |
| 61 | + if( !toggle ) return; |
55 | 62 | if( diff.style.display == 'none' ) { |
56 | 63 | diff.style.display = 'inline'; |
57 | | - if( toggle ) { |
58 | | - toggle.innerHTML = this.messages.revreviewDiffToggleHide; |
59 | | - } |
| 64 | + toggle.innerHTML = this.messages.revreviewDiffToggleHide; |
60 | 65 | } else { |
61 | 66 | diff.style.display = 'none'; |
62 | | - if( toggle ) { |
63 | | - toggle.innerHTML = this.messages.revreviewDiffToggleShow; |
64 | | - } |
| 67 | + toggle.innerHTML = this.messages.revreviewDiffToggleShow; |
65 | 68 | } |
66 | 69 | }, |
67 | 70 | |
— | — | @@ -69,11 +72,10 @@ |
70 | 73 | var log = document.getElementById('mw-fr-logexcerpt'); |
71 | 74 | if( !log ) return; |
72 | 75 | var toggle = document.getElementById('mw-fr-logtoggle'); |
| 76 | + if( !toggle ) return; |
73 | 77 | if( log.style.display == 'none' ) { |
74 | 78 | log.style.display = 'inline'; |
75 | | - if( toggle ) { |
76 | | - toggle.innerHTML = ''; |
77 | | - } |
| 79 | + toggle.innerHTML = ''; |
78 | 80 | } |
79 | 81 | } |
80 | 82 | }; |
Index: trunk/extensions/FlaggedRevs/client/review.js |
— | — | @@ -202,11 +202,13 @@ |
203 | 203 | msg = msg.substr(5); // remove <t#x> |
204 | 204 | } |
205 | 205 | var tier = regm ? regm[1] : 0; // review tier |
| 206 | + /* |
206 | 207 | // Output any response message |
207 | 208 | if( msg.length ) { |
208 | 209 | jsMsg( msg, 'review' ); // success/failure notice |
209 | 210 | window.scroll(0,0); // scroll up to notice |
210 | 211 | } |
| 212 | + */ |
211 | 213 | var rsubmit = document.getElementById("mw-fr-submitreview"); |
212 | 214 | var usubmit = document.getElementById("mw-fr-submitunreview"); |
213 | 215 | var legend = document.getElementById("mw-fr-reviewformlegend"); |
— | — | @@ -223,12 +225,20 @@ |
224 | 226 | if( rsubmit.value == wgAjaxReview.sendingMsg ) { |
225 | 227 | // For template review case go from re-review to review message |
226 | 228 | legend.innerHTML = '<strong>'+wgAjaxReview.flagLegMsg+'</strong>'; |
227 | | - rsubmit.value = wgAjaxReview.flagMsg; // back to normal |
228 | | - usubmit.disabled = ''; // unlock unflag button |
| 229 | + rsubmit.value = wgAjaxReview.flaggedMsg; // done! |
| 230 | + rsubmit.style.fontWeight = 'bold'; |
| 231 | + // Unlock and reset *unflag* button |
| 232 | + usubmit.value = wgAjaxReview.unflagMsg; |
| 233 | + usubmit.removeAttribute( 'style' ); // back to normal |
| 234 | + usubmit.disabled = ''; |
229 | 235 | // Revision was unflagged |
230 | 236 | } else if( usubmit.value == wgAjaxReview.sendingMsg ) { |
231 | | - usubmit.value = wgAjaxReview.unflagMsg; // back to normal |
232 | | - rsubmit.disabled = ''; // unlock flag button |
| 237 | + usubmit.value = wgAjaxReview.unflaggedMsg; // done! |
| 238 | + usubmit.style.fontWeight = 'bold'; |
| 239 | + // Unlock and reset *flag* button |
| 240 | + rsubmit.value = wgAjaxReview.flagMsg; |
| 241 | + rsubmit.removeAttribute( 'style' ); // back to normal |
| 242 | + rsubmit.disabled = ''; |
233 | 243 | } |
234 | 244 | } else { |
235 | 245 | rsubmit.value = wgAjaxReview.sendMsg; // back to normal |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -851,10 +851,12 @@ |
852 | 852 | # Only for pages manually made to be stable... |
853 | 853 | if ( $this->article->isPageLocked() ) { |
854 | 854 | $s = wfMsgExt( 'revreview-locked', 'parseinline' ); |
| 855 | + $s .= ' ' . FlaggedRevsXML::logToggle('revreview-log-details-show'); |
855 | 856 | $s .= FlaggedRevsXML::stabilityLogExcerpt( $this->article ); |
856 | 857 | # ...or unstable |
857 | 858 | } elseif ( $this->article->isPageUnlocked() ) { |
858 | 859 | $s = wfMsgExt( 'revreview-unlocked', 'parseinline' ); |
| 860 | + $s .= ' ' . FlaggedRevsXML::logToggle('revreview-log-details-show'); |
859 | 861 | $s .= FlaggedRevsXML::stabilityLogExcerpt( $this->article ); |
860 | 862 | } |
861 | 863 | return $s; |
— | — | @@ -1615,14 +1617,14 @@ |
1616 | 1618 | if ( count( FlaggedRevs::getDimensions() ) > 1 ) |
1617 | 1619 | $form .= "<br />"; // Don't put too much on one line |
1618 | 1620 | $form .= "<span id='mw-fr-commentbox' style='clear:both'>" . |
1619 | | - Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 40, '', |
| 1621 | + Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 35, '', |
1620 | 1622 | array( 'class' => 'fr-comment-box' ) ) . " </span>"; |
1621 | 1623 | } |
1622 | 1624 | # Add the submit buttons |
1623 | 1625 | $form .= FlaggedRevsXML::ratingSubmitButtons( $frev, (bool)$toggle, $allowRereview ); |
1624 | 1626 | # Show stability log if there is anything interesting... |
1625 | 1627 | if( $this->article->isPageLocked() ) { |
1626 | | - $form .= ' ' . FlaggedRevsXML::logToggle(); |
| 1628 | + $form .= ' ' . FlaggedRevsXML::logToggle('revreview-log-toggle-show'); |
1627 | 1629 | } |
1628 | 1630 | $form .= Xml::closeElement( 'span' ); |
1629 | 1631 | # ..add the actual stability log body here |