X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FTable.class.php;h=ea0d28e85202b7f5fe75a9f08cbb0381fff91ead;hb=3a5964df63eb410b66e02326ebc7f7c90e8d606e;hp=b41a1f12c01da58748b2888508347c811af12061;hpb=466c7825f8313f5e3a11c63383537c8bb302a932;p=timetracker.git
diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php
index b41a1f12..ea0d28e8 100644
--- a/WEB-INF/lib/form/Table.class.php
+++ b/WEB-INF/lib/form/Table.class.php
@@ -41,15 +41,15 @@ class Table extends FormElement {
var $mBgColor = '#ffffff';
var $mBgColorOver = '#eeeeff';
var $mWidth = '';
- var $cClassName = 'Table';
+ var $class = 'Table';
var $mTableOptions = array();
var $mRowOptions = array();
var $mHeaderOptions = array();
var $mProccessed = false;
function __construct($name, $value='') {
- $this->mName = $name;
- $this->mValue = $value;
+ $this->name = $name;
+ $this->value = $value;
}
function setKeyField($value) {
@@ -95,11 +95,11 @@ class Table extends FormElement {
}
function _process() {
- $this->mProccessed = true;
+ $this->mProccessed = true;
- if ($this->mInteractive) {
+ 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)");
@@ -115,7 +115,6 @@ class Table extends FormElement {
}
function toStringControl() {
- if (!$this->isRenderable()) return "";
if (!$this->mProccessed) $this->_process();
$html = "";
@@ -160,8 +159,8 @@ class Table extends FormElement {
if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
// Checkbox for the row. Determine if selected.
$selected = false;
- if (is_array($this->mValue)) {
- foreach ($this->mValue as $p) {
+ if (is_array($this->value)) {
+ foreach ($this->value as $p) {
if ($p == $this->mData[$row][$this->mKeyField]) {
$selected = true;
break;
@@ -191,7 +190,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";