[Jifty-commit] r1164 - in jifty: trunk/share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Jun 5 14:16:56 EDT 2006


Author: nelhage
Date: Mon Jun  5 14:16:53 2006
New Revision: 1164

Modified:
   jifty/   (props changed)
   jifty/trunk/share/web/static/js/jifty.js

Log:
 r6841 at phanatique:  nelhage | 2006-06-05 13:48:14 -0400
 Reordered loops to be slightly more efficient


Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Mon Jun  5 14:16:53 2006
@@ -614,13 +614,14 @@
 // to the action we're performing
 function disable_fields_for_actions (){
     var actions = arguments[0];
-    for(var i = 0; i < actions.length; i++) {
-	var moniker = actions[i];
-	inputs = document.getElementsByTagName('input');
-	for(var j = 0; j < inputs.length; j++) {
-	    var input = inputs[j];
+    inputs = document.getElementsByTagName('input');
+    for(var j = 0; j < inputs.length; j++) {
+	var input = inputs[j];
+	for(var i = 0; i < actions.length; i++) {
+	    var moniker = actions[i];
 	    if(input.id.indexOf(moniker) >= 0) {
 		input.disabled = true;
+		break;
 	    }
 	}
     }


More information about the Jifty-commit mailing list