index dd70b733254ab02430c4acfeae24fd8d221d4673..4439b559abb49c2a550fcce68b4cefe0c6ca699a 100644 (file)
protected $snapHandler = null;
// The listing handlers
- protected $headpage = null;
- protected $filter = null;
+ private $headpage = null;
+ private $filter = null;
// A list of configured actions/events
protected $actions = array();
$this->registerAction("apply", "applyChanges");
$this->registerAction("save", "saveChanges");
$this->registerAction("cancel", "cancelEdit");
+ $this->registerAction("cancelDelete", "cancelEdit");
$this->registerAction("remove", "removeEntryRequested");
$this->registerAction("removeConfirmed", "removeEntryConfirmed");
}
$this->snapHandler->setSnapshotBases($bases);
}
-
+
+ // Display list
+ return($this->renderList());
+ }
+
+ function renderList()
+ {
$this->headpage->update();
$display = $this->headpage->render();
return($this->getHeader().$display);
}
+ function getHeadpage()
+ {
+ return($this->headpage);
+ }
+ function getFilter()
+ {
+ return($this->filter);
+ }
/*! \brief Generates the plugin header which is displayed whenever a tab object is
* opened.
// Check if there is a dialog opened - We don't need any buttons in this case.
if($this->tabObject->by_object[$this->tabObject->current]){
$current = $this->tabObject->by_object[$this->tabObject->current];
- if(is_object($current->dialog)){
+ if(isset($current->dialog) && (is_object($current->dialog) || $current->dialog)){
return("");
}
}
$this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
$this->tabObject->set_acl_base($this->dn);
$this->tabObject->delete ();
+ $this->tabObject->parent = &$this;
// Remove the lock for the current object.
del_lock($this->dn);
*/
function detectPostActions()
{
+ if(!is_object($this->headpage)){
+ trigger_error("No valid headpage given....!");
+ return(array());
+ }
$action= $this->headpage->getAction();
if(isset($_POST['edit_apply'])) $action['action'] = "apply";
if(isset($_POST['edit_finish'])) $action['action'] = "save";
if(isset($_POST['edit_cancel'])) $action['action'] = "cancel";
if(isset($_POST['delete_confirmed'])) $action['action'] = "removeConfirmed";
+ if(isset($_POST['delete_cancel'])) $action['action'] = "cancelDelete";
// Detect Snapshot actions
if(isset($_POST['CreateSnapshot'])) $action['action'] = "saveSnapshot";
if(!empty($entry) && $this->ui->allow_snapshot_create($entry,$this->aclCategory)){
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->aclCategories = array($this->aclCategory);
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to create a snapshot for %s."),$entry),
* @param Array 'target' A list of object dns, which should be affected by this method.
* @param Array 'all' A combination of both 'action' and 'target'.
*/
- function saveSnapsho($action="",$target=array(),$all=array())
+ function saveSnapshot($action="",$target=array(),$all=array())
{
$this->dialogObject->save_object();
$msgs = $this->dialogObject->check();
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_all_removed_objects = true;
$this->dialogObject->display_restore_dialog = true;
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry),
ERROR_DIALOG);
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_restore_dialog = true;
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry),
ERROR_DIALOG);
}else{
$this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
$this->tabObject->set_acl_base($this->headpage->getBase());
+ $this->tabObject->parent = &$this;
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!");
}
}
$this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory);
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!");
$this->tabObject->set_acl_base($this->dn);
+ $this->tabObject->parent = &$this;
}
}else{