diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-10 19:27:47 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-10 19:27:47 +0100 |
commit | 97869b581fc2af1724dbf07652533f7d2ded9371 (patch) | |
tree | eabc2b7602a1603cc1fdfbe202128c04ee2f8b43 /framework/Web/UI/ActiveControls/TActiveRadioButtonList.php | |
parent | 12a60b062acb73bf000cbb4b03e8b45aaaf185bc (diff) |
Optimization: avoid duplicate creation of T*CheckBoxList, T*RadioButtonList js items
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveRadioButtonList.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveRadioButtonList.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php index 17e0b431..84a71951 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php @@ -77,7 +77,7 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, */ protected function createRepeatedControl() { - $control = new TActiveRadioButton; + $control = new TActiveRadioButtonItem; $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); return $control; } @@ -128,3 +128,18 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, } + +class TActiveRadioButtonItem extends TActiveRadioButton +{ + /** + * Override client implementation to avoid emitting the javascript + * + * @param THtmlWriter the writer for the rendering purpose + * @param string checkbox id + * @param string onclick js + */ + protected function renderInputTag($writer,$clientID,$onclick) + { + TRadioButton::renderInputTag($writer,$clientID,$onclick); + } +}
\ No newline at end of file |