From: hickert Date: Tue, 17 Apr 2007 09:16:34 +0000 (+0000) Subject: Added checkboxes and toggle all to users list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=faab480498f479bdac4cbf11ee632f7ff6feff75;p=gosa.git Added checkboxes and toggle all to users list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6065 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/include/focus.js b/html/include/focus.js index 3b86afac8..a8c3375f0 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -27,6 +27,13 @@ function chk_set_all(regex,value) } +function toggle_all_(regex,state_object) +{ + state = document.getElementById(state_object).checked; + chk_set_all(regex, state); +} + + function scrollDown() { document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight; timeout= setTimeout("scrollDown()", 500); diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 6924e034b..8a2571376 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -51,8 +51,12 @@ class divListUsers extends MultiSelectWindow $action_col_size += 38; } + /* Toggle all selected / deselected */ + $chk = ""; + /* set Page header */ - $this->AddHeader(array("string"=>" ", "attach"=>"style='width:20px;'")); + $this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'")); $this->AddHeader(array("string"=>_("Username")." / "._("Department"))); $this->AddHeader(array("string"=>_("Properties"), "attach" => "style='width:166px;'")); $this->AddHeader(array("string"=>_("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'")); @@ -287,13 +291,14 @@ class divListUsers extends MultiSelectWindow $UseImg = $usrimg2." ".$posix." ".$enviro." ".$maila." ".$fonac." ".$faxac." ".$samba." ".$netatalk; /* Create each field */ + $field0 = array("string" => ""); $field1 = array("string" => sprintf($tpl,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); $field3 = array("string" => $UseImg, "attach" => "style='width:166px;'"); $field4 = array("string" => $s_img_create_from_template.preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:".$action_col_size."px;border-right:0px; text-align:right;'"); /* Add to list */ - $add = array($field1,$field2,$field3,$field4); + $add = array($field0,$field1,$field2,$field3,$field4); $this->AddElement($add); // Template or User diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 4e7337c8f..fc587889b 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -674,7 +674,7 @@ class userManagement extends plugin /* Add departments if subsearch is disabled */ if(!$this->DivListUsers->SubSearch){ - $this->DivListUsers->AddDepartments($this->DivListUsers->selectedBase,4); + $this->DivListUsers->AddDepartments($this->DivListUsers->selectedBase,4,1); } $this->reload(); $this->DivListUsers->setEntries($this->list);