projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring - some renaming.
[timetracker.git]
/
WEB-INF
/
lib
/
form
/
Table.class.php
diff --git
a/WEB-INF/lib/form/Table.class.php
b/WEB-INF/lib/form/Table.class.php
index
89f6543
..
807e2c7
100644
(file)
--- 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 $mBgColor = '#ffffff';
var $mBgColorOver = '#eeeeff';
var $mWidth = '';
- var $c
ClassName
= 'Table';
+ var $c
lass
= 'Table';
var $mTableOptions = array();
var $mRowOptions = array();
var $mHeaderOptions = array();
var $mProccessed = false;
var $mTableOptions = array();
var $mRowOptions = array();
var $mHeaderOptions = array();
var $mProccessed = false;
- function
Table
($name, $value='') {
- $this->
mN
ame = $name;
- $this->
mV
alue = $value;
+ function
__construct
($name, $value='') {
+ $this->
n
ame = $name;
+ $this->
v
alue = $value;
}
function setKeyField($value) {
}
function setKeyField($value) {
@@
-95,11
+95,11
@@
class Table extends FormElement {
}
function _process() {
}
function _process() {
-
$this->mProccessed = true;
+ $this->mProccessed = true;
-
if ($this->mInteractive) {
+ if ($this->mInteractive) {
// Add a column of clickable checkboxes.
// Add a column of clickable checkboxes.
- $column = new TableColumn("","<input type=\"checkbox\" name=\"".$this->
getName()
."_all\" onclick=\"setAll(this.checked)\">");
+ $column = new TableColumn("","<input type=\"checkbox\" name=\"".$this->
name
."_all\" onclick=\"setAll(this.checked)\">");
import('form.CheckboxCellRenderer');
$cb = new CheckboxCellRenderer();
if ($this->getIAScript()) $cb->setOnChangeAdd($this->getIAScript()."(this)");
import('form.CheckboxCellRenderer');
$cb = new CheckboxCellRenderer();
if ($this->getIAScript()) $cb->setOnChangeAdd($this->getIAScript()."(this)");
@@
-114,8
+114,7
@@
class Table extends FormElement {
}
}
}
}
- function toStringControl() {
- if (!$this->isRenderable()) return "";
+ function getHtml() {
if (!$this->mProccessed) $this->_process();
$html = "";
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 (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
// Checkbox for the row. Determine if selected.
$selected = false;
- if (is_array($this->
mV
alue)) {
- foreach ($this->
mV
alue as $p) {
+ if (is_array($this->
v
alue)) {
+ foreach ($this->
v
alue as $p) {
if ($p == $this->mData[$row][$this->mKeyField]) {
$selected = true;
break;
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";
// 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";
$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";
@@
-223,4
+222,3
@@
class Table extends FormElement {
return $html;
}
}
return $html;
}
}
-?>
\ No newline at end of file