summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33d4f79)
raw | patch | inline | side by side (parent: 33d4f79)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 06:58:01 +0000 (06:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 06:58:01 +0000 (06:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5295 594d385d-05f5-0310-b6e9-bd551577e9d8
html/include/focus.js | patch | blob | history | |
include/class_acl.inc | patch | blob | history |
diff --git a/html/include/focus.js b/html/include/focus.js
index cc6bc15dff4cce53bcce59d4d18b70d27c7ff411..f5a61911111499e1261cd8cf4585364636986afe 100644 (file)
--- a/html/include/focus.js
+++ b/html/include/focus.js
netscape= (ver.charAt(iln+1).toUpperCase() != "C");
+/* 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;
+ }
+ }
+ }
+}
+
function keyPress(DnEvents) {
// determines whether Netscape or Internet Explorer
k = (netscape) ? DnEvents.keyCode : window.event.keyCode;
diff --git a/include/class_acl.inc b/include/class_acl.inc
index dec421bec554a299818248ac8a34567b071c4ee5..9024689fe136c322635f57f15903cc15f31a7f51 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
$plist= $tmp->info;
asort($plist);
+ /* Add select all/none buttons */
+ $display .= "<input type='button' name='all_create' onClick=\"acl_toggle_all('_0_c$');\" value='C'> ";
+ $display .= "<input type='button' name='all_move' onClick=\"acl_toggle_all('_0_m$');\" value='M'> ";
+ $display .= "<input type='button' name='all_remove' onClick=\"acl_toggle_all('_0_d$');\" value='D'> ";
+ $display .= "<input type='button' name='all_read' onClick=\"acl_toggle_all('_0_r$');\" value='R'> ";
+ $display .= "<input type='button' name='all_write' onClick=\"acl_toggle_all('_0_w$');\" value='W'> ";
+
+ $display .= "<input type='button' name='all_write' onClick=\"acl_toggle_all('[^0]_r$');\" value='R+'> ";
+ $display .= "<input type='button' name='all_write' onClick=\"acl_toggle_all('[^0]_w$');\" value='W+'> ";
/* Build general objects */
$list =$this->sort_by_priority($list);