From: anuko Date: Tue, 28 Feb 2017 17:34:16 +0000 (+0000) Subject: Refactoring - removed unused stuff. X-Git-Tag: timetracker_1.19-1~1547 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5532fe6cfc2125063ff8040cfa80e20089ac64b0;p=timetracker.git Refactoring - removed unused stuff. --- diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index e9d50976..4257d26a 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -93,8 +93,6 @@ class Calendar extends FormElement { $indate = $this->value; if (!$indate) $indate = strftime(DB_DATEFORMAT); - if (!$this->isRenderable()) return ""; - //current year and month if ( strlen ( $indate ) > 0 ) { $indateObj = new DateAndTime(DB_DATEFORMAT, $indate); diff --git a/WEB-INF/lib/form/Checkbox.class.php b/WEB-INF/lib/form/Checkbox.class.php index 7a49a6fb..37189625 100644 --- a/WEB-INF/lib/form/Checkbox.class.php +++ b/WEB-INF/lib/form/Checkbox.class.php @@ -45,9 +45,8 @@ class Checkbox extends FormElement { function setData($value) { $this->mOptions = $value; } function getData() { return $this->mOptions; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function toStringControl() { + if ($this->id=="") $this->id = $this->name; $html = "\n\tlSelNone = $i18n->getKey('label.select_none'); } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function toStringControl() { + if ($this->id=="") $this->id = $this->name; $renderArray = array(); diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index 19081948..e253e8ec 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -65,9 +65,8 @@ class Combobox extends FormElement { function getDataKeys() { return $this->mDataKeys; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function toStringControl() { + if ($this->id=="") $this->id = $this->name; $html = "\n\tisRenderable()) return ""; + function toStringControl() { if (!$this->isEnable()) { $html = htmlspecialchars($this->getValue()). diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index 384dbebd..fde8b400 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -40,7 +40,6 @@ class FormElement { var $style = ''; // Control style. // TODO: refactoring ongoing down from here. - var $mRenderable = true; var $mEnabled = true; var $cClassName = "FormElement"; var $mI18n = null; @@ -76,10 +75,7 @@ class FormElement { function setStyle($value) { $this->style = $value; } function getStyle() { return $this->style; } - - function setRenderable($flag) { $this->mRenderable = $flag; } - function isRenderable() { return $this->mRenderable; } - + function setEnable($flag) { $this->mEnabled = $flag; } function isEnable() { return $this->mEnabled; } diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index ba3d698c..236fdb4b 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -37,8 +37,7 @@ class Submit extends FormElement { $this->value = $value; } - function toStringControl() { - if (!$this->isRenderable()) return ""; + function toStringControl() { if ($this->id=="") $this->id = $this->name; diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 44685d46..e0930095 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -95,9 +95,9 @@ 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)\">"); import('form.CheckboxCellRenderer'); @@ -115,7 +115,6 @@ class Table extends FormElement { } function toStringControl() { - if (!$this->isRenderable()) return ""; if (!$this->mProccessed) $this->_process(); $html = ""; diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 784803b2..4f176fb3 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -47,9 +47,8 @@ class TextArea extends FormElement { function setRows($value) { $this->mRows = $value; } function getRows() { return $this->mRows; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function toStringControl() { + if ($this->id=="") $this->id = $this->mName; $js_maxlen = ""; diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index e4d58659..9107c963 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -41,9 +41,7 @@ class TextField extends FormElement { function setAsPassword($name) { $this->mPassword = $name; } function getAsPassword() { return $this->mPassword; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function toStringControl() { if (!$this->isEnable()) { $html = "name\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n"; } else { diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index 97a2a8ca..c3a32763 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -41,10 +41,9 @@ class UploadFile extends FormElement { function setMaxSize($value) { $this->mMaxSize = $value; } function getMaxSize() { return $this->mMaxSize; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->id=="") $this->id = $this->name; + function toStringControl() { + + if ($this->id=="") $this->id = $this->name; $html = "\n\tmMaxSize."\"/>"; $html .= "\n\t -
 Anuko Time Tracker 1.10.38.3604 | Copyright © Anuko | +  Anuko Time Tracker 1.10.38.3605 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}