summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TCheckBoxList.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBoxList.php')
-rw-r--r--framework/Web/UI/WebControls/TCheckBoxList.php30
1 files changed, 18 insertions, 12 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php
index 5122432c..029b6c89 100644
--- a/framework/Web/UI/WebControls/TCheckBoxList.php
+++ b/framework/Web/UI/WebControls/TCheckBoxList.php
@@ -4,9 +4,8 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.WebControls
*/
@@ -43,7 +42,6 @@ Prado::using('System.Web.UI.WebControls.TCheckBox');
* The alignment of the text besides each checkbox can be specified via {@link setTextAlign TextAlign}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: TCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.WebControls
* @since 3.0
*/
@@ -74,7 +72,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
*/
protected function createRepeatedControl()
{
- return new TCheckBox;
+ return new TCheckBoxItem;
}
/**
@@ -256,7 +254,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
{
return false;
}
-
+
/**
* @param boolean whether the control is to be enabled.
*/
@@ -264,8 +262,8 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
{
parent::setEnabled($value);
$value = !TPropertyValue::ensureBoolean($value);
- // if this is an active control,
- // and it's a callback,
+ // if this is an active control,
+ // and it's a callback,
// and we can update clientside,
// then update the 'disabled' attribute of the items.
if(($this instanceof IActiveControl) &&
@@ -389,14 +387,14 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
/**
* Wether the list should be rendered inside a span or not
- *
+ *
*@return boolean true if we need a span
*/
protected function getSpanNeeded ()
{
return $this->getRepeatLayout()===TRepeatLayout::Raw;
}
-
+
/**
* Renders the checkbox list control.
* This method overrides the parent implementation.
@@ -459,7 +457,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
}
/**
- * Returns true if this control validated successfully.
+ * Returns true if this control validated successfully.
* Defaults to true.
* @return bool wether this control validated successfully.
*/
@@ -491,13 +489,21 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont
*/
protected function getPostBackOptions()
{
- $options['ListID'] = $this->getClientID();
+ $options['ID'] = $this->getClientID();
$options['ValidationGroup'] = $this->getValidationGroup();
$options['CausesValidation'] = $this->getCausesValidation();
$options['ListName'] = $this->getUniqueID();
$options['ItemCount'] = $this->getItemCount();
return $options;
}
-
+
}
+class TCheckBoxItem extends TCheckBox {
+ /**
+ * Override client implementation to avoid emitting the javascript
+ */
+ protected function renderClientControlScript($writer)
+ {
+ }
+}