From 311455360c4d47bd49bb1ede461ccc71e5ff6dae Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 4 Dec 2006 12:22:21 +0000 Subject: [PATCH] Added some acl debugging utils git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5300 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 31 +++++++++++++++++++++---------- include/class_acl.inc | 29 +++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index f5a619111..cb9f8c195 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -15,19 +15,30 @@ for (iln = 0; iln < len; iln++){ netscape= (ver.charAt(iln+1).toUpperCase() != "C"); +/* Toggle checkbox that matches regex */ +function acl_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; + } + } +} + /* Toggle checkbox that matches regex */ function acl_toggle_all(regex) { - for (var i = 0; i < document.mainform.elements.length; i++) { - var _id=document.mainform.elements[i].id; - if(_id.match(regex)) { - if (document.getElementById(_id).checked == true){ - document.getElementById(_id).checked= false; - } else { - document.getElementById(_id).checked= true; - } - } - } + for (var i = 0; i < document.mainform.elements.length; i++) { + var _id=document.mainform.elements[i].id; + if(_id.match(regex)) { + if (document.getElementById(_id).checked == true){ + document.getElementById(_id).checked= false; + } else { + document.getElementById(_id).checked= true; + } + } + } } function keyPress(DnEvents) { diff --git a/include/class_acl.inc b/include/class_acl.inc index 9024689fe..a9b7389ad 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -504,14 +504,27 @@ class acl extends plugin asort($plist); /* Add select all/none buttons */ - $display .= " "; - $display .= " "; - $display .= " "; - $display .= " "; - $display .= " "; - - $display .= " "; - $display .= " "; + $style = "style='width:100px;'"; + + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + + $display .= ""; + $display .= ""; + + $display .= "
"; + + $style = "style='width:50px;'"; + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + /* Build general objects */ $list =$this->sort_by_priority($list); -- 2.30.2