Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -389,7 +389,7 @@ |
390 | 390 | |
391 | 391 | public function isApproval() { |
392 | 392 | # If all values are set to zero, this has been unapproved |
393 | | - if( !count( FlaggedRevs::getDimensions() ) && $this->approve ) { |
| 393 | + if( FlaggedRevs::dimensionsEmpty() && $this->approve ) { |
394 | 394 | return true; // no tags & approve param given |
395 | 395 | } |
396 | 396 | foreach( $this->dims as $quality => $value ) { |
Index: trunk/extensions/FlaggedRevs/client/review.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | * c) Also remove comment box clutter in case of invalid input. |
10 | 10 | */ |
11 | 11 | FlaggedRevs.updateRatingForm = function() { |
12 | | - var ratingform = document.getElementById('mw-ratingselects'); |
| 12 | + var ratingform = document.getElementById('mw-fr-ratingselects'); |
13 | 13 | if( !ratingform ) return; |
14 | 14 | var disabled = document.getElementById('fr-rating-controls-disabled'); |
15 | 15 | if( disabled ) return; |
— | — | @@ -57,12 +57,12 @@ |
58 | 58 | } |
59 | 59 | } |
60 | 60 | // Show note box only for quality revs |
61 | | - var notebox = document.getElementById('mw-notebox'); |
| 61 | + var notebox = document.getElementById('mw-fr-notebox'); |
62 | 62 | if( notebox ) { |
63 | 63 | notebox.style.display = quality ? 'inline' : 'none'; |
64 | 64 | } |
65 | 65 | // If only a few levels are zero, don't show submit link |
66 | | - var submit = document.getElementById('mw-submitreview'); |
| 66 | + var submit = document.getElementById('mw-fr-submitreview'); |
67 | 67 | if( submit ) { |
68 | 68 | submit.disabled = ( somezero && !allzero ) ? 'disabled' : ''; |
69 | 69 | } |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | wgAjaxReview.supported = false; |
104 | 104 | return true; |
105 | 105 | } |
106 | | - var form = document.getElementById("mw-reviewform"); |
| 106 | + var form = document.getElementById("mw-fr-reviewform"); |
107 | 107 | var notes = document.getElementById("wpNotes"); |
108 | 108 | var reason = document.getElementById("wpReason"); |
109 | 109 | if( !form ) { |
— | — | @@ -115,13 +115,17 @@ |
116 | 116 | for( var i=0; i < inputs.length; i++) { |
117 | 117 | // Different input types may occur depending on tags... |
118 | 118 | if( inputs[i].name == "title" || inputs[i].name == "action" ) { |
119 | | - // No need to send these... |
| 119 | + continue; // No need to send these... |
120 | 120 | } else if( inputs[i].type == "submit" ) { |
121 | 121 | inputs[i].value = wgAjaxReview.sendingMsg; |
122 | 122 | } else if( inputs[i].type == "checkbox" ) { |
123 | 123 | args.push( inputs[i].name + "|" + (inputs[i].checked ? inputs[i].value : 0) ); |
124 | | - } else if( inputs[i].type != "radio" || inputs[i].checked ) { |
125 | | - args.push( inputs[i].name + "|" + inputs[i].value ); |
| 124 | + } else if( inputs[i].type == "radio" ) { |
| 125 | + if( inputs[i].checked ) { // must be checked |
| 126 | + args.push( inputs[i].name + "|" + inputs[i].value ); |
| 127 | + } |
| 128 | + } else { |
| 129 | + args.push( inputs[i].name + "|" + inputs[i].value ); // Includes text/hiddens... |
126 | 130 | } |
127 | 131 | inputs[i].disabled = "disabled"; |
128 | 132 | } |
— | — | @@ -152,8 +156,8 @@ |
153 | 157 | }; |
154 | 158 | |
155 | 159 | wgAjaxReview.unlockForm = function() { |
156 | | - var form = document.getElementById("mw-reviewform"); |
157 | | - var submit = document.getElementById("mw-submitreview"); |
| 160 | + var form = document.getElementById("mw-fr-reviewform"); |
| 161 | + var submit = document.getElementById("mw-fr-submitreview"); |
158 | 162 | var notes = document.getElementById("wpNotes"); |
159 | 163 | var reason = document.getElementById("wpReason"); |
160 | 164 | if( !form || !submit ) { |
— | — | @@ -185,17 +189,17 @@ |
186 | 190 | if( (msg = response.substr(6)) ) { |
187 | 191 | jsMsg( msg, 'review' ); // success notice |
188 | 192 | window.scroll(0,0); // scroll up to notice |
189 | | - tagBox = document.getElementById('mw-revisiontag'); |
| 193 | + tagBox = document.getElementById('mw-fr-revisiontag'); |
190 | 194 | if( tagBox ) tagBox.style.display = 'none'; // remove tag from draft |
191 | 195 | } |
192 | 196 | wgAjaxReview.inprogress = false; |
193 | 197 | if( wgAjaxReview.timeoutID ) { |
194 | 198 | window.clearTimeout(wgAjaxReview.timeoutID); |
195 | 199 | } |
196 | | - var submit = document.getElementById("mw-submitreview"); |
197 | | - var binaryState = document.getElementById("mw-reviewstate"); |
198 | | - var legend = document.getElementById("mw-reviewformlegend"); |
199 | | - var diffNotice = document.getElementById("mw-difftostable"); |
| 200 | + var submit = document.getElementById("mw-fr-submitreview"); |
| 201 | + var binaryState = document.getElementById("mw-fr-reviewstate"); |
| 202 | + var legend = document.getElementById("mw-fr-reviewformlegend"); |
| 203 | + var diffNotice = document.getElementById("mw-fr-difftostable"); |
200 | 204 | // On success... |
201 | 205 | if( response.indexOf('<suc#>') == 0 ) { |
202 | 206 | document.title = wgAjaxReview.actioncomplete; |
— | — | @@ -234,7 +238,7 @@ |
235 | 239 | }; |
236 | 240 | |
237 | 241 | wgAjaxReview.onLoad = function() { |
238 | | - var submit = document.getElementById("mw-submitreview"); |
| 242 | + var submit = document.getElementById("mw-fr-submitreview"); |
239 | 243 | if( submit ) { |
240 | 244 | submit.onclick = wgAjaxReview.ajaxCall; |
241 | 245 | } |