summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-10 16:24:53 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-01-10 16:24:53 +0100
commit1f7c124858073c35ed4f753e84495e9bebd25cfc (patch)
treeded342c913449f52b4a798bad088648ef410635a /framework/Web/Javascripts
parent91c664a088cf9177b8c6ca27d9c1ada88476b304 (diff)
Fixed AutoPostback of TImageButton, TCheckBoxList, TRadioButtonList
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/source/prado/controls/controls.js30
1 files changed, 14 insertions, 16 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);
}
}