X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/098a79f0819ebb89b7d48df4a6b154af4560f68e..9a23a8c0a51b7ec38a96f525484134f3cb85dc7e:/WEB-INF/lib/form/DefaultCellRenderer.class.php diff --git a/WEB-INF/lib/form/DefaultCellRenderer.class.php b/WEB-INF/lib/form/DefaultCellRenderer.class.php new file mode 100644 index 00000000..adbd141e --- /dev/null +++ b/WEB-INF/lib/form/DefaultCellRenderer.class.php @@ -0,0 +1,74 @@ +mCellValue; } + function setValue($value) { $this->mCellValue = $value; } + + function getOptions() { return $this->mCellOptions; } + function setOptions($value) { $this->mCellOptions = $value; } + + function getOnChangeAdd() { return $this->mOnChangeAdd; } + function setOnChangeAdd($value) { $this->mOnChangeAdd = $value; } + + function toStringOpenTag() { + $html = "mCellOptions as $k=>$v) { + $html .= " $k=\"$v\""; + } + $html .= ">"; + return $html; + } + + function toStringCloseTag() { + return ""; + } + + function toStringValue($value) { + return ($this->mCellValue=='' || $this->mCellValue==null ? ' ' : $this->mCellValue); + } + + function toString() { + return $this->toStringOpenTag() . $this->toStringValue('') . $this->toStringCloseTag(); + } + + function render(&$table, $value, $row, $column, $selected = false) { + $this->setValue($value); + return $this->toString(); + } +} +?> \ No newline at end of file