You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ha...@apache.org on 2008/07/19 18:11:38 UTC
svn commit: r678180 -
/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js
Author: hazems
Date: Sat Jul 19 09:11:38 2008
New Revision: 678180
URL: http://svn.apache.org/viewvc?rev=678180&view=rev
Log:
https://issues.apache.org/jira/browse/TOMAHAWK-1302
Bug in SelectManyPicklist with MSIE7, Solved thanks to Gertjan van Oosten.
Modified:
myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js
Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js?rev=678180&r1=678179&r2=678180&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/picklist/resource/picklist.js Sat Jul 19 09:11:38 2008
@@ -48,9 +48,12 @@
if(selectedIndex < 0) { return; }
// Decremental loop, so the index is not affected in the moves
- for(var i = fromList.length - 1; i >= 0; i--) {
- if(fromList.options.item(i).selected) {
- toList.appendChild(fromList.options.item(i));
+ for (var i = fromList.options.length - 1; i >= 0; i--) {
+ if(fromList.options[i].selected) {
+ var tLen = toList.options.length;
+ toList.options[tLen] = new Option(fromList.options[i].text);
+ toList.options[tLen].value = fromList.options[i].value;
+ fromList.options[i] = null;
}
}