summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73ad9c5)
raw | patch | inline | side by side (parent: 73ad9c5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 12:22:21 +0000 (12:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 12:22:21 +0000 (12:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5300 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 f5a61911111499e1261cd8cf4585364636986afe..cb9f8c1950a304e9eb6952dae699ea10b2588196 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_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 9024689fe136c322635f57f15903cc15f31a7f51..a9b7389ad47c798104ea73be48fe39616bd7462a 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
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+'> ";
+ $style = "style='width:100px;'";
+
+ $display .= "<input ".$style." type='button' name='toggle_all_create' onClick=\"acl_toggle_all('_0_c$');\" value='Toggle C'>";
+ $display .= "<input ".$style." type='button' name='toggle_all_move' onClick=\"acl_toggle_all('_0_m$');\" value='Toggle M'>";
+ $display .= "<input ".$style." type='button' name='toggle_all_remove' onClick=\"acl_toggle_all('_0_d$');\" value='Toggle D'>";
+ $display .= "<input ".$style." type='button' name='toggle_all_read' onClick=\"acl_toggle_all('_0_r$');\" value='Toggle R'>";
+ $display .= "<input ".$style." type='button' name='toggle_all_write' onClick=\"acl_toggle_all('_0_w$');\" value='Toggle W'>";
+
+ $display .= "<input ".$style." type='button' name='toggle_all_sub_read' onClick=\"acl_toggle_all('[^0]_r$');\" value='R+'>";
+ $display .= "<input ".$style." type='button' name='toggle_all_sub_write' onClick=\"acl_toggle_all('[^0]_w$');\" value='W+'>";
+
+ $display .= "<br>";
+
+ $style = "style='width:50px;'";
+ $display .= "<input ".$style." type='button' name='set_true_all_create' onClick=\"acl_set_all('_0_c$',true);\" value='C+'>";
+ $display .= "<input ".$style." type='button' name='set_false_all_create' onClick=\"acl_set_all('_0_c$',false);\" value='C-'>";
+ $display .= "<input ".$style." type='button' name='set_true_all_move' onClick=\"acl_set_all('_0_m$',true);\" value='M+'>";
+ $display .= "<input ".$style." type='button' name='set_false_all_move' onClick=\"acl_set_all('_0_m$',false);\" value='M-'>";
+ $display .= "<input ".$style." type='button' name='set_true_all_remove' onClick=\"acl_set_all('_0_d$',true);\" value='D+'>";
+ $display .= "<input ".$style." type='button' name='set_false_all_remove' onClick=\"acl_set_all('_0_d$',false);\" value='D-'>";
+
/* Build general objects */
$list =$this->sort_by_priority($list);