summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/source/prado/controls/controls.js30
-rw-r--r--framework/Web/UI/WebControls/TCheckBoxList.php2
2 files changed, 15 insertions, 17 deletions
diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js
index fa01e2e2..00a39e66 100644
--- a/framework/Web/Javascripts/source/prado/controls/controls.js
+++ b/framework/Web/Javascripts/source/prado/controls/controls.js
@@ -290,11 +290,11 @@ Prado.WebUI.TImageButton = jQuery.klass(Prado.WebUI.PostBackControl,
* Override parent onPostBack function, tried to add hidden forms
* inputs to capture x,y clicked point.
*/
- onPostBack : function(event, options)
+ onPostBack : function(options, event)
{
- this.addXYInput(event,options);
- new Prado.PostBack(event, options);
- this.removeXYInput(event,options);
+ this.addXYInput(options, event);
+ new Prado.PostBack(options, event);
+ this.removeXYInput(options, event);
},
/**
@@ -302,7 +302,7 @@ Prado.WebUI.TImageButton = jQuery.klass(Prado.WebUI.PostBackControl,
* @param event DOM click event.
* @param array image button options.
*/
- addXYInput : function(event,options)
+ addXYInput : function(options, event)
{
var imagePos = jQuery(this.element).offset();
var clickedPos = [event.clientX, event.clientY];
@@ -335,7 +335,7 @@ Prado.WebUI.TImageButton = jQuery.klass(Prado.WebUI.PostBackControl,
* @param event DOM click event.
* @param array image button options.
*/
- removeXYInput : function(event,options)
+ removeXYInput : function(options, event)
{
var id = this.element.id;
jQuery('#'+id+'_x').remove();
@@ -496,16 +496,15 @@ jQuery.klass(Prado.WebUI.TTextHighlighter,
Prado.WebUI.TCheckBoxList = jQuery.klass(Prado.WebUI.Control,
{
- constructor : function(options)
+ onInit : function(options)
{
- Prado.Registry.set(options.ListID, this);
for(var i = 0; i<options.ItemCount; i++)
{
- var checkBoxOptions = jQuery.extend(
+ var checkBoxOptions = jQuery.extend({}, options,
{
- ID : options.ListID+"_c"+i,
+ ID : options.ID+"_c"+i,
EventTarget : options.ListName+"$c"+i
- }, options);
+ });
new Prado.WebUI.TCheckBox(checkBoxOptions);
}
}
@@ -513,16 +512,15 @@ Prado.WebUI.TCheckBoxList = jQuery.klass(Prado.WebUI.Control,
Prado.WebUI.TRadioButtonList = jQuery.klass(Prado.WebUI.Control,
{
- constructor : function(options)
+ onInit : function(options)
{
- Prado.Registry.set(options.ListID, this);
for(var i = 0; i<options.ItemCount; i++)
{
- var radioButtonOptions = jQuery.extend(
+ var radioButtonOptions = jQuery.extend({}, options,
{
- ID : options.ListID+"_c"+i,
+ ID : options.ID+"_c"+i,
EventTarget : options.ListName+"$c"+i
- }, options);
+ });
new Prado.WebUI.TRadioButton(radioButtonOptions);
}
}
diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php
index af59545c..16e6b7f5 100644
--- a/framework/Web/UI/WebControls/TCheckBoxList.php
+++ b/framework/Web/UI/WebControls/TCheckBoxList.php
@@ -489,7 +489,7 @@ 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();