summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c90e32c)
raw | patch | inline | side by side (parent: c90e32c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Oct 2007 08:38:34 +0000 (08:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Oct 2007 08:38:34 +0000 (08:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7625 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/gotomasses/class_divListMasses.inc | patch | blob | history | |
plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history |
diff --git a/plugins/addons/gotomasses/class_divListMasses.inc b/plugins/addons/gotomasses/class_divListMasses.inc
index f6e94223488e50add4074a4484b66f9b8b4699a9..f6c1bea9c96b3def9bbf1138130ccee2443dcda3 100644 (file)
var $parent ;
var $ui ;
+ var $wake = TRUE;
+
function divListMasses (&$config,$parent)
{
MultiSelectWindow::MultiSelectWindow($config, "gotoMasses", array("gotomasses"));
$this->EnableCloseButton(FALSE);
$this->EnableSaveButton(FALSE);
$this->SetInformation(_("This menu allows you to add, remove and change the properties of system deployment tasks."));
+
+ foreach($this->parent->get_actions() as $name => $desc){
+ $this->$name = TRUE;
+ $this->AddCheckBox($name,$desc,$desc,TRUE);
+ }
$this->GenHeader();
}
$plug = $_GET['plug'];
$edit_link = "<div style='width:100%;overflow:hidden;'><nobr><a href='?plug=".$_GET['plug']."&act=edit&id=%key%'>%str%</nobr></div>";
+ /* Create action filter array, to sort out those actions we do not want to see */
+ $allowed_action = array();
+ foreach($this->parent->get_actions() as $name => $desc){
+ if($this->$name){
+ $allowed_action[] = $name;
+ }
+ }
+
foreach($tasks as $key => $task){
+
+ /* Skip unchecked actions */
+ if(!in_array($task['Action'],$allowed_action)){
+ continue;
+ }
+
$action = "<input type='image' src='images/edit.png' name='edit_task_".$key."' class='center' alt='"._("Edit")."'>";
if($this->parent->acl_is_removeable()){
$action.= "<input type='image' src='images/edittrash.png' name='remove_task_".$key."' class='center' alt='"._("Reomve")."'>";
diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc
index 4a58ca9c8db74179e8499b15c506f28239f3e579..e54e70119368a01baea7a783202889f443d562e7 100644 (file)
if(!empty($file)){
$this->data_file = $file;
}
+ $this->divlist = new divListMasses($this->config,$this);
$this->load_gotomasses_data();
}
* Handle Divlist
************/
- $list = new divListMasses($this->config,$this);
- $list->SetEntries($this->tasks);
- return($list->Draw());
+ $this->divlist->ClearElementsList();
+ $this->divlist->SetEntries($this->tasks);
+ return($this->divlist->Draw());
}
function save_gotomasses_data()
{
- $str = "#GOsa generated file, please just modify if you realy know what you do.";
+ $str = "#GOsa generated file, please just modify if you really know what you do.";
foreach($this->tasks as $task){
$str .= "\n#".trim($task['Comment']);
$str .= "\n";
function save_object()
{
+ $this->divlist->save_object();
}