Update of /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community In directory james.mmbase.org:/tmp/cvs-serv31448
Modified Files: userlist_table.jspf Log Message: CMSC-949, Blocking users: user status enhancements,add javascript to jspf See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community See also: http://www.mmbase.org/jira/browse/CMSC-949 Index: userlist_table.jspf =================================================================== RCS file: /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community/userlist_table.jspf,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- userlist_table.jspf 11 Dec 2008 05:32:57 -0000 1.13 +++ userlist_table.jspf 12 Dec 2008 05:34:21 -0000 1.14 @@ -42,7 +42,23 @@ </edit:ui-tcolumn> </edit:ui-table> <script language="JavaScript"> - onState(); + (function onState(){ + var sels = document.getElementsByTagName("select"); + for (i = 0; i < sels.length; i++) { + var sel = sels[i]; + var options = sel.getElementsByTagName("option"); + var v = options[0]; + if ("" == v.value) { + options[0].parentNode.removeChild(options[0]); + } + for (j = 1; j < options.length; j++) { + if (v.value.toUpperCase() == options[j].value.toUpperCase()) { + options[j].selected=true; + options[0].parentNode.removeChild(options[0]); + } + } + } +})(); function selectAll(value, formName, elementPrefix) { var elements = document.forms[formName].elements; for (var i = 0; i < elements.length; i++) { _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs