From 1f7c124858073c35ed4f753e84495e9bebd25cfc Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 10 Jan 2014 16:24:53 +0100 Subject: Fixed AutoPostback of TImageButton, TCheckBoxList, TRadioButtonList --- .../Javascripts/source/prado/controls/controls.js | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'framework/Web/Javascripts/source') 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