From: hickert Date: Tue, 27 Jun 2006 05:47:48 +0000 (+0000) Subject: Added grey restore vutton to top of divlist X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=91555d07ea996d18533880d0868221544b8e2dfd;p=gosa.git Added grey restore vutton to top of divlist git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3922 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 128639d12..c21927f09 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -309,7 +309,8 @@ class departmentManagement extends plugin }else{ /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListDepartment->selectedBase,$this->DivListDepartment->selectedBase)){ + $base = $this->DivListDepartment->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -324,6 +325,14 @@ class departmentManagement extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array($this->DivListDepartment->selectedBase)); + } + + + function reload() { /* Vairaible init */ diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index e2b1509e6..9d4af1e2d 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -80,13 +80,7 @@ class divListDepartment extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= "   ". "  ". diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index fcbb72468..d9912120f 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -131,13 +131,7 @@ _("Submit")."'> ". title='"._("New profile")."' name='Create_profile' alt='"._("P")."'> ". "\"\" "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= "  ". diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 5dde279a3..85c904909 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -562,16 +562,8 @@ class faiManagement extends plugin ****************/ /* Check if there is a snapshot dialog open */ - $tmp = array(); - $types = array("hooks","scripts","disk","packages","profiles","templates","variables"); - foreach($types as $type){ - if($this->DivListFai->selectedBranch == "main"){ - $tmp[] = "ou=".$type.",ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase; - }else{ - $tmp[] = "ou=".$type.",".$this->DivListFai->selectedBranch; - } - } - if($str = $this->showSnapshotDialog($this->DivListFai->selectedBase,$tmp)){ + $base = $this->DivListFai->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -585,6 +577,22 @@ class faiManagement extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + $tmp = array(); + $types = array("hooks","scripts","disk","packages","profiles","templates","variables"); + foreach($types as $type){ + if($this->DivListFai->selectedBranch == "main"){ + $tmp[] = "ou=".$type.",ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase; + }else{ + $tmp[] = "ou=".$type.",".$this->DivListFai->selectedBranch; + } + } + return($tmp); + } + + /* Get available branches for current base */ function getBranches($base = false,$prefix = "") { diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index 06c9b5b47..1605e4cf1 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -101,14 +101,7 @@ class divListGroup extends MultiSelectWindow "  ". "  ". "  "; - - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead.="  ". $Copy_Paste. "  ". diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index e7751d531..2d2bc5248 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -340,12 +340,13 @@ class groupManagement extends plugin return ($display); } - + /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListGroup->selectedBase,array(get_groups_ou().$this->DivListGroup->selectedBase))){ + $base = $this->DivListGroup->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } - + /* Display dialog with group list */ $this->DivListGroup->parent = $this; $this->DivListGroup->execute(); @@ -359,6 +360,15 @@ class groupManagement extends plugin return($this->DivListGroup->Draw()); } + + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array(get_groups_ou().$this->DivListGroup->selectedBase)); + } + + + function reload($CreatePosixsList=false) { $this->grouplist = array(); diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index 607a6976c..861ffe2e9 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -110,14 +110,7 @@ class divListOGroup extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .=" ". $Copy_Paste. diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 7f5bdeebe..5862a7663 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -346,8 +346,9 @@ class ogroupManagement extends plugin Display list ****************/ - /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListOGroup->selectedBase,array(get_groups_ou().$this->DivListOGroup->selectedBase))){ + /* Check if there is a snapshot dialog open */ + $base = $this->DivListOGroup->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -365,6 +366,14 @@ class ogroupManagement extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array(get_people_ou().$this->DivListOGroup->selectedBase)); + } + + + function convert_list($input) { $temp= ""; diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index a415e19e9..d5898fd27 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -322,8 +322,8 @@ class blocklist extends plugin ***************/ /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListBlocklist->selectedBase, - array("ou=gofax,ou=systems,". $this->DivListBlocklist->selectedBase))){ + $base = $this->DivListBlocklist->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -342,6 +342,13 @@ class blocklist extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array("ou=gofax,ou=systems,". $this->DivListBlocklist->selectedBase)); + } + + /* Clear garbage from edited lists */ function clear_fields() { diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index 171393df6..fc024a1d4 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -88,13 +88,7 @@ class divListBlocklist extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= "  ". " ". diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 073486bb0..8d40cba52 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -89,13 +89,7 @@ class divListConference extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= _("Base")." ". "  ". @@ -168,7 +162,7 @@ class divListConference extends MultiSelectWindow $a_field4 = array("string"=> $pin, "attach" => $title." style='width:50px;'"); if(($this->parent->ui->dn==$conference['goFonConferenceOwner'][0])&&(chkacl($this->parent->acl,"goFonConferenceOwner")=="")){ - $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$action.$actions), "attach" => $title."style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); + $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$actions), "attach" => $title."style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); }elseif(chkacl($this->parent->acl,"goFonConferenceOwner")==""){ $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$action.$actions2), "attach" => $title."style='width:52px;border-right:0px;text-align:right;'"); }else{ diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index f2b093910..0be3ec8e6 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -256,8 +256,8 @@ class phoneConferenceManagment extends plugin ***************/ /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListConference->selectedBase, - array("ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase))){ + $base = $this->DivListConference->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -276,6 +276,13 @@ class phoneConferenceManagment extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array("ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase)); + } + + /* Reload entries for divlist. * reload all conferences for the current base, with the given regex */ diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index dc17d6b60..284c939ad 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -85,13 +85,7 @@ class divListMacro extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= "  ". "  ". diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index 3c213883d..aab1648bd 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -278,8 +278,8 @@ class gofonMacro extends plugin *****************/ /* Check if there is a snapshot dialog open */ - if($str = $this->showSnapshotDialog($this->DivListMacro->selectedBase, - array("ou=macros,ou=asterisk,ou=configs,ou=systems,".$this->DivListMacro->selectedBase))){ + $base = $this->DivListMacro->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -298,6 +298,13 @@ class gofonMacro extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array("ou=macros,ou=asterisk,ou=configs,ou=systems,".$this->DivListMacro->selectedBase)); + } + + function reload() { /* Set base for all searches */