r82024 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82023‎ | r82024 | r82025 >
Date:20:05, 12 February 2011
Author:aaron
Status:deferred
Tags:
Comment:
* Removed timeout and unused vars
* Tabify code
Modified paths:
  • /trunk/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)
  • /trunk/extensions/FlaggedRevs/client/review.js (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -82,10 +82,10 @@
8383 'isMouseOutBubble': function( event, parentId ) {
8484 var toNode = null;
8585 if( event.relatedTarget != undefined ) {
86 - toNode = event.relatedTarget; // FF/Opera/Safari
87 - } else {
88 - toNode = event.toElement; // IE
89 - }
 86+ toNode = event.relatedTarget; // FF/Opera/Safari
 87+ } else {
 88+ toNode = event.toElement; // IE
 89+ }
9090 if( toNode ) {
9191 var nextParent = toNode.parentNode;
9292 while( nextParent ) {
Index: trunk/extensions/FlaggedRevs/client/review.js
@@ -14,16 +14,16 @@
1515 if( !ratingform ) return;
1616 var disabled = document.getElementById('fr-rating-controls-disabled');
1717 if( disabled ) return;
18 -
 18+
1919 var quality = true;
2020 var somezero = false;
21 -
 21+
2222 // Determine if this is a "quality" or "incomplete" review
2323 for( tag in wgFlaggedRevsParams.tags ) {
2424 var controlName = "wp" + tag;
2525 var levels = document.getElementsByName(controlName);
2626 if( !levels.length ) continue;
27 -
 27+
2828 var selectedlevel = 0; // default
2929 if( levels[0].nodeName == 'SELECT' ) {
3030 selectedlevel = levels[0].selectedIndex;
@@ -39,10 +39,10 @@
4040 } else {
4141 return; // error: should not happen
4242 }
43 -
 43+
4444 // Get quality level for this tag
4545 qualityLevel = wgFlaggedRevsParams.tags[tag]['quality'];
46 -
 46+
4747 if( selectedlevel < qualityLevel ) {
4848 quality = false; // not a quality review
4949 }
@@ -163,7 +163,6 @@
164164 FlaggedRevsReview.lockReviewForm( form ); // disallow submissions
165165
166166 var notes = document.getElementById("wpNotes");
167 - var reason = document.getElementById("wpReason");
168167 // Build up arguments array and update submit button text...
169168 var requestArgs = []; // array of strings of the format <"pname|pval">.
170169 var inputs = form.getElementsByTagName("input");
@@ -212,7 +211,6 @@
213212 dataType: "html", // response type
214213 success : function( response ) {
215214 FlaggedRevsReview.updateReviewForm( form, response ); },
216 - timeout : 5000, // 5 second timeout
217215 error : function( response ) {
218216 FlaggedRevsReview.unlockReviewForm( form ); }
219217 });

Status & tagging log