X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FTable.class.php;h=78fddf5045556ca868a32118aca0f7ab28f5a76b;hb=e897b5c63d2e36b018970e1305760fc14976d7d3;hp=e0930095bc6e2637a5453aca16fedc5c46a42bab;hpb=5532fe6cfc2125063ff8040cfa80e20089ac64b0;p=timetracker.git
diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php
index e0930095..78fddf50 100644
--- a/WEB-INF/lib/form/Table.class.php
+++ b/WEB-INF/lib/form/Table.class.php
@@ -41,15 +41,14 @@ class Table extends FormElement {
var $mBgColor = '#ffffff';
var $mBgColorOver = '#eeeeff';
var $mWidth = '';
- var $cClassName = 'Table';
var $mTableOptions = array();
var $mRowOptions = array();
var $mHeaderOptions = array();
var $mProccessed = false;
- function __construct($name, $value='') {
+ function __construct($name) {
+ $this->class = 'Table';
$this->name = $name;
- $this->value = $value;
}
function setKeyField($value) {
@@ -99,7 +98,7 @@ class Table extends FormElement {
if ($this->mInteractive) {
// Add a column of clickable checkboxes.
- $column = new TableColumn("","getName()."_all\" onclick=\"setAll(this.checked)\">");
+ $column = new TableColumn("","name."_all\" onclick=\"setAll(this.checked)\">");
import('form.CheckboxCellRenderer');
$cb = new CheckboxCellRenderer();
if ($this->getIAScript()) $cb->setOnChangeAdd($this->getIAScript()."(this)");
@@ -114,7 +113,7 @@ class Table extends FormElement {
}
}
- function toStringControl() {
+ function getHtml() {
if (!$this->mProccessed) $this->_process();
$html = "";
@@ -190,7 +189,7 @@ class Table extends FormElement {
// setAll - checks / unchecks all checkboxes in the table.
$html .= "function setAll(value) {\n";
$html .= "\tfor (var i = 0; i < ".$this->getFormName().".elements.length; i++) {\n";
- $html .= "\t\tif ((".$this->getFormName().".elements[i].type=='checkbox') && (".$this->getFormName().".elements[i].name=='".$this->getName()."[]')) {\n";
+ $html .= "\t\tif ((".$this->getFormName().".elements[i].type=='checkbox') && (".$this->getFormName().".elements[i].name=='".$this->name."[]')) {\n";
$html .= "\t\t\t".$this->getFormName().".elements[i].checked=value;\n";
if ($this->getIAScript()) {
$html .= "\t\t\t".$this->getIAScript()."(".$this->getFormName().".elements[i]);\n";