From 8b3b214c305ab78b1942e080b4d6543ff4060bf8 Mon Sep 17 00:00:00 2001 From: tof <> Date: Fri, 18 Apr 2008 09:43:30 +0000 Subject: Makes TCheckboxList and derived controls render a surrounding span in Raw mode to allow clients scripts to identify them using ClientId. --- UPGRADE | 3 +++ framework/Web/UI/WebControls/TCheckBoxList.php | 12 +----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/UPGRADE b/UPGRADE index 5dc3ff93..3a0a8852 100644 --- a/UPGRADE +++ b/UPGRADE @@ -18,6 +18,9 @@ Upgrading from v3.1.1 to 'albums' => array(self::MANY_TO_MANY, 'Artist', 'album_artists') - Active Record no longer automatically adds/removes/updates related objects. +- 'Raw' mode for TCheckboxList and TRadioButtonList (and their active counter parts) now render + a surrounding tag to allow client scripts to identify them with the ClientId. You may + have to check your CSS. Upgrading from v3.1.0 diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index 51b363ad..d6eca318 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -366,17 +366,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont */ protected function getSpanNeeded () { - if ($this->getRepeatLayout()===TRepeatLayout::Raw) - { - $id=$this->getID(); - // Check if we have a validator registered for this control - foreach ($this->getPage()->getValidators() as $v) - { - if ($v->getControlToValidate()===$id) - return true; - } - } - return false; + return $this->getRepeatLayout()===TRepeatLayout::Raw; } /** -- cgit v1.2.3