Code

Updated toggle functions
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Dec 2006 09:07:42 +0000 (09:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Dec 2006 09:07:42 +0000 (09:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5424 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js

index 46220ff7a8c45c84314afab5df2af70ebd0812f5..2c49901216b4d0ba905e39dcff35d85c991246ab 100644 (file)
@@ -16,6 +16,18 @@ for (iln = 0; iln < len; iln++){
 netscape= (ver.charAt(iln+1).toUpperCase() != "C");
 
 
+/* Toggle checkbox that matches regex */
+function chk_set_all(regex,value)
+{
+                               for (var i = 0; i < document.mainform.elements.length; i++) {
+                                                               var _id=document.mainform.elements[i].id;
+                                                               if(_id.match(regex)) {
+                                                                                               document.getElementById(_id).checked= value;
+                                                               }
+                               }
+}
+
+
 function scrollDown() {
        document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight;
        timeout= setTimeout("scrollDown()", 500);