summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0d5fb6)
raw | patch | inline | side by side (parent: e0d5fb6)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 12 Nov 2007 10:13:13 +0000 (10:13 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 12 Nov 2007 10:13:13 +0000 (10:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7770 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ObjectListViewport.inc | patch | blob | history |
index 3ec96e99538c13fc62179b7a0e776ea28d2db68d..f46744c73e69438f944e6631c4a46193d2c6e6ca 100644 (file)
/* Internal variable for color alternation */
protected $colorAlternator= 0;
- /* Dummy here ----> */
private $headline;
private $footer;
private $entryFormat;
+
+ /* Dummy here ----> */
private $attributes= array('cn', '_icon', '_actions', 'dn');
-
/* <---- Dummy here */
+
private $displayHeaderFlag= TRUE;
private $displayFooterFlag= TRUE;
private $numberOfCols= 0;
/*! \brief ID used to identify objects of same list */
private $id = "";
+
/*! \brief ObjectListViewport constructor
\param config Config section that is used to configure this ObjectListViewport
*/
- public function __construct($config, $multiselect= TRUE){
+ public function __construct($config, $multiselect= TRUE, $displayHeader= TRUE, $displayFooter= FALSE){
- $this->multiselect= $multiselect;
- /* Dummy here */
+ /* Transfer initialization values */
+ $this->displayFooterFlag= $displayFooter;
+ $this->displayHeaderFlag= $displayHeader;
+ $this->multiselect= $multiselect;
+
+ /* Load list configuration from ConfigManager */
$cr= Registry::getInstance("ConfigManager");
$cr->setSection($config);
$this->parseHeadline($cr->getValue("headline"));
$this->objects= new ObjectList($config);
/* generate an unique id */
- $this->id = preg_replace("/[^0-9]/","",microtime());
+ $this->id= uniqid();
}
+
/*! \brief Handles _POST / _GET events
Processes the list of registered plugins to do their eventHandler and adapt
}
+ /*! \brief Processes post events
+
+ Processes all post events and acts as needed.
+
+ \return bool for if changes are present or not
+ */
+ private function process(){
+
+ /* TODO: process input */
+ return FALSE;
+ }
+
+
/*! \brief Renders headline into a string
Gets the headline description from the ObjectList object and renders it.
*/
private function renderHeadline(){
$tpl =" <tr>
- <td class='ObjectListViewport_TD_Header' id='ObjectListViewport_TD_Header".$this->id."'>
- <table class='ObjectListViewport_Header_Table' id='ObjectListViewport_Header_Table".$this->id."'>
+ <td class='ObjectListViewport_TD_Header' id='ObjectListViewport_TD_Header_".$this->id."'>
+ <table class='ObjectListViewport_Header_Table' id='ObjectListViewport_Header_Table_".$this->id."'>
<tr>
{content}
</tr>
*/
private function renderFooter(){
$buffer ="<tr>
- <td class='ObjectListViewport_TD_Footer' id='ObjectListViewport_TD_Footer".$this->id."'>
+ <td class='ObjectListViewport_TD_Footer' id='ObjectListViewport_TD_Footer_".$this->id."'>
<table class='ObjectListViewport_Footer_Table'>
<tr>
<td class='ObjectListViewport_Footer_Cell' colspan='".count($this->headline)."'>".$this->footer."</td>
}
+ /* TODO: replace this -> not our task */
private function getEntryIcon($entry,$alt = ""){
return("<img src='images/".$entry['_icon']."' alt='".$alt."' class='center'>");
}
/* Generate fixed headline */
$buffer = "
- <table class='ObjectListViewport' id='ObjectListViewport".$this->id."' cellspacing=0 cellpadding=0>
+ <table class='ObjectListViewport' id='ObjectListViewport_".$this->id."' cellspacing=0 cellpadding=0>
<tr>
<td>
- <table class='ObjectListViewport_Table' id='ObjectListViewport_Table".$this->id."' cellpadding=0 cellspacing=0 >
+ <table class='ObjectListViewport_Table' id='ObjectListViewport_Table_".$this->id."' cellpadding=0 cellspacing=0 >
".$header."
<tr>
- <td class='ObjectListViewport_TD_Entries' id='ObjectListViewport_TD_Entries".$this->id."'>
- <div class='ObjectListViewport_Entry_Cover' id='ObjectListViewport_Entry_Cover".$this->id."'>
- <table class='ObjectListViewport_Entry_Table' id='ObjectListViewport_Entry_Table".$this->id."'>
+ <td class='ObjectListViewport_TD_Entries' id='ObjectListViewport_TD_Entries_".$this->id."'>
+ <div class='ObjectListViewport_Entry_Cover' id='ObjectListViewport_Entry_Cover_".$this->id."'>
+ <table class='ObjectListViewport_Entry_Table' id='ObjectListViewport_Entry_Table_".$this->id."'>
".$entries."
</table>
</div>
$this->headline= $cell_formats;
}
-
- public function enableFooter($bool= TRUE){
- $this->displayFooterFlag= $bool;
- }
-
-
- public function enableHeader($bool= TRUE){
- $this->displayHeaderFlag= $bool;
- }
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: