Index: trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php |
— | — | @@ -168,12 +168,15 @@ |
169 | 169 | $form .= "<span id='mw-fr-commentbox' style='clear:both'>" . |
170 | 170 | Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 40, '', |
171 | 171 | array( 'maxlength' => 255, 'class' => 'fr-comment-box' ) ) . |
172 | | - "   </span>"; |
| 172 | + "   </span>\n"; |
173 | 173 | } |
174 | 174 | # Determine if there will be reject button |
175 | 175 | $rejectId = $this->rejectRefRevId(); |
176 | 176 | # Add the submit buttons |
177 | 177 | $form .= self::submitButtons( $rejectId, $frev, (bool)$disabled, $reviewIncludes ); |
| 178 | + # Untoggle "reviewing" status on exit |
| 179 | + $form .= '<script type="text/javascript">var jsReviewingStatus = ' . |
| 180 | + (int)( $u == $this->user->getName() ) . "</script>\n"; |
178 | 181 | # Show stability log if there is anything interesting... |
179 | 182 | if ( $article->isPageLocked() ) { |
180 | 183 | $form .= ' ' . FlaggedRevsXML::logToggle( 'revreview-log-toggle-show' ); |
— | — | @@ -190,7 +193,6 @@ |
191 | 194 | $form .= Html::hidden( 'target', $article->getTitle()->getPrefixedDBKey() ) . "\n"; |
192 | 195 | $form .= Html::hidden( 'refid', $priorRevId, array( 'id' => 'mw-fr-input-refid' ) ) . "\n"; |
193 | 196 | $form .= Html::hidden( 'oldid', $revId, array( 'id' => 'mw-fr-input-oldid' ) ) . "\n"; |
194 | | - $form .= Html::hidden( 'action', 'submit' ) . "\n"; |
195 | 197 | $form .= Html::hidden( 'wpEditToken', $this->user->editToken() ) . "\n"; |
196 | 198 | $form .= Html::hidden( 'changetime', $reviewTime, |
197 | 199 | array( 'id' => 'mw-fr-input-changetime' ) ) . "\n";; // id for JS |
— | — | @@ -385,10 +387,10 @@ |
386 | 388 | 'title' => wfMsg( 'revreview-tt-unflag' ), |
387 | 389 | 'style' => $frev ? '' : 'display:none' |
388 | 390 | ) + ( $disabled ? $disAttrib : array() ) |
389 | | - ); |
| 391 | + ) . "\n"; |
390 | 392 | // Disable buttons unless state changes in some cases (non-JS compatible) |
391 | | - $s .= "<script type=\"text/javascript\"> |
392 | | - var jsReviewNeedsChange = " . (int)$needsChange . "</script>"; |
| 393 | + $s .= '<script type="text/javascript">var jsReviewNeedsChange = ' . |
| 394 | + (int)$needsChange . "</script>\n"; |
393 | 395 | return $s; |
394 | 396 | } |
395 | 397 | |
Index: trunk/extensions/FlaggedRevs/presentation/modules/review.js |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | */ |
325 | 325 | 'deadvertiseReviewing': function() { |
326 | 326 | var form = document.getElementById('mw-fr-reviewform'); |
327 | | - if( form ) { |
| 327 | + if( form && jsReviewingStatus ) { |
328 | 328 | var oRevId = document.getElementById('mw-fr-input-refid').value; |
329 | 329 | var nRevId = document.getElementById('mw-fr-input-oldid').value; |
330 | 330 | } else if( location.href.indexOf('&reviewing=1') != -1 ) { |