Author: lukaszlenart
Date: Sat Apr 10 13:52:09 2010
New Revision: 932721

URL: http://svn.apache.org/viewvc?rev=932721&view=rev
Log:
Resolved WW-3182 - reimplemented removeOption()

Modified:
    
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js

Modified: 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js?rev=932721&r1=932720&r2=932721&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
 Sat Apr 10 13:52:09 2010
@@ -28,9 +28,12 @@ function addOption(objTextBox, objTarget
 }
 
 function removeOptions(objTargetElement) {
-    for(var i=0;i<objTargetElement.options.length;i++) {
-        if(objTargetElement.options[i].selected) {
-            objTargetElement.options[i] = null;
+    var i = 0;
+    while(objTargetElement.options.length > i) {
+        if (objTargetElement.options[i].selected) {
+            objTargetElement.options.remove(i);
+        } else {
+            i++;
         }
     }
 }


Reply via email to