var $mColumns = array(); // array of columns in table
var $mData = null; // array of rows with data for column cells
var $mHeaders = array(); // column headers
+ var $mFooters = array(); // column footers
var $mInteractive = true; // adds a clickable checkbox column to table
var $mIAScript = null; // sctipt to execute when a checkbox is clicked
var $mKeyField = ''; // identifies a column used as key to access row data
foreach ($this->mColumns as $column) {
$this->mColumnFields[] = $column->getField();
$this->mHeaders[] = $column->getHeader();
+ $this->mFooters[] = $column->getFooter();
}
}
$html .= "</tr>\n";
}
+ // Print footers.
+ if (($this->mInteractive && (count($this->mFooters) > 1)) || (!$this->mInteractive && (count($this->mFooters) > 0))) {
+ $html .= "<tr";
+ if (count($this->mRowOptions) > 0) {
+ foreach ($this->mRowOptions as $k=>$v) {
+ $html .= " $k=\"$v\"";
+ }
+ }
+ $html .= ">\n";
+ foreach ($this->mFooters as $footer) {
+ $html .= "<th";
+ if (count($this->mHeaderOptions) > 0) {
+ foreach ($this->mHeaderOptions as $k=>$v) {
+ $html .= " $k=\"$v\"";
+ }
+ }
+ $html .= ">$footer</th>\n";
+ }
+ $html .= "</tr>\n";
+ }
+
$html .= "</table>";
return $html;
}
import('form.DefaultCellRenderer');
+// TableColumn class represents a single column in a table.
class TableColumn {
- var $mTitle = "";
+ var $colHeader = ''; // Column header.
+ var $colFooter = ''; // Column footer, example: totals in week view.
+
+// TODO: refactoring ongoing down from here.
+
var $mIndexField = "";
var $mRenderer = null;
var $mWidth = "";
var $mBgColor = "#ffffff";
var $mFgColor = "#000000";
- function __construct($indexField, $title="",$renderer=null) {
+ function __construct($indexField, $header = '', $renderer = null, $footer = '') {
$this->mIndexField = $indexField;
- $this->mTitle = $title;
+ $this->colHeader = $header;
+ $this->colFooter = $footer;
if ($renderer!=null) {
$this->mRenderer = $renderer;
} else {
}
}
- function getHeader() { return $this->mTitle; }
-
+ function getHeader() { return $this->colHeader; }
+ function getFooter() { return $this->colFooter; }
+
function getField() { return $this->mIndexField; }
function setTable(&$table) { $this->mTable = &$table; }
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.12.3.3689 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.12.3.3690 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>