r99342 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99341‎ | r99342 | r99343 >
Date:08:34, 9 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Unlock "reject" button when a user accepts and then un-accepts a revision
Modified paths:
  • /trunk/extensions/FlaggedRevs/presentation/modules/ext.flaggedRevs.review.js (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/presentation/modules/ext.flaggedRevs.review.js
@@ -214,6 +214,7 @@
215215 // Review form elements
216216 var asubmit = $( '#mw-fr-submit-accept' ); // ACCEPT
217217 var usubmit = $( '#mw-fr-submit-unaccept' ); // UNACCEPT
 218+ var rsubmit = $( '#mw-fr-submit-reject' ); // REJECT
218219 var diffNotice = $( '#mw-fr-difftostable' );
219220 // FlaggedRevs rating box
220221 var tagBox = $( '#mw-fr-revisiontag' );
@@ -233,6 +234,7 @@
234235 usubmit.css( 'fontWeight', '' ); // back to normal
235236 usubmit.show(); // now available
236237 usubmit.prop( 'disabled', '' ); // unlock
 238+ rsubmit.prop( 'disabled', 'disabled' ); // lock if present
237239 // Revision was unflagged
238240 } else if ( usubmit.val() === mw.msg( 'revreview-submitting' ) ) {
239241 usubmit.val( mw.msg( 'revreview-submit-unreviewed' ) ); // done!
@@ -241,6 +243,7 @@
242244 asubmit.val( mw.msg( 'revreview-submit-review' ) );
243245 asubmit.css( 'fontWeight', '' ); // back to normal
244246 asubmit.prop( 'disabled', '' ); // unlock
 247+ rsubmit.prop( 'disabled', '' ); // unlock if present
245248 }
246249 }
247250 // (b) Remove review tag from drafts

Status & tagging log