summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/prado/controls.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/prado/controls.js')
-rw-r--r--framework/Web/Javascripts/prado/controls.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js
index c472c1be..d059b4a5 100644
--- a/framework/Web/Javascripts/prado/controls.js
+++ b/framework/Web/Javascripts/prado/controls.js
@@ -56,18 +56,38 @@ Prado.WebUI.ClickableComponent = Prado.WebUI.createPostBackComponent(
doPostBack = onclicked;
}
if(doPostBack)
- Prado.PostBack(event,options);
+ this.onPostBack(event,options);
if(isBoolean(onclicked) && !onclicked)
Event.stop(event);
+ },
+
+ onPostBack : function(event, options)
+ {
+ Prado.PostBack(event,options);
}
});
Prado.WebUI.TLinkButton = Prado.WebUI.ClickableComponent;
Prado.WebUI.TImageButton = Prado.WebUI.ClickableComponent;
Prado.WebUI.TCheckBox = Prado.WebUI.ClickableComponent;
-Prado.WebUI.TRadioButton = Prado.WebUI.ClickableComponent;
Prado.WebUI.TBulletedList = Prado.WebUI.ClickableComponent;
+/**
+ * Radio button, only initialize if not already checked.
+ */
+Prado.WebUI.TRadioButton = Prado.WebUI.ClickableComponent;
+Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize = Prado.WebUI.TRadioButton.prototype.initialize;
+Object.extend(Prado.WebUI.TRadioButton.prototype,
+{
+ initialize : function(options)
+ {
+ this.element = $(options['ID']);
+ if(!this.element.checked)
+ this.onRadioButtonInitialize(options);
+ }
+});
+
+
Prado.WebUI.TTextBox = Prado.WebUI.createPostBackComponent(
{
onInit : function(options)