summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/prado
diff options
context:
space:
mode:
authorwei <>2006-02-02 06:06:30 +0000
committerwei <>2006-02-02 06:06:30 +0000
commit2037f60c73a77f28cc09fcb64cb424e16c593765 (patch)
treeccc4002a0dc984028e0381f5d4e9342022108075 /framework/Web/Javascripts/prado
parenta2a030c3cfbb0249762fffa4159107bc13f8952d (diff)
Fixed #21
Diffstat (limited to 'framework/Web/Javascripts/prado')
-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)