diff options
author | wei <> | 2006-02-02 07:08:16 +0000 |
---|---|---|
committer | wei <> | 2006-02-02 07:08:16 +0000 |
commit | 71ea1bd064dc36004e610fff56a23d09578cd7eb (patch) | |
tree | 5cedacd6f906d3f0eaefe1ec98c5151ab23eb8c3 /framework/Web/Javascripts/prado | |
parent | b2fba25e4b146c4896304377643e498a22a3ced0 (diff) |
Fixed #27
Diffstat (limited to 'framework/Web/Javascripts/prado')
-rw-r--r-- | framework/Web/Javascripts/prado/controls.js | 5 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/form.js | 4 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/validation.js | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js index d059b4a5..7a1a8257 100644 --- a/framework/Web/Javascripts/prado/controls.js +++ b/framework/Web/Javascripts/prado/controls.js @@ -8,8 +8,9 @@ Object.extend(Prado.WebUI.PostBackControl.prototype, {
this.element = $(options['ID']);
if(options['CausesValidation'] && Prado.Validation)
+ {
Prado.Validation.AddTarget(options['ID'], options['ValidationGroup']);
-
+ }
//TODO: what do the following options do?
//options['PostBackUrl']
//options['ClientSubmit']
@@ -75,7 +76,7 @@ Prado.WebUI.TBulletedList = Prado.WebUI.ClickableComponent; /**
* Radio button, only initialize if not already checked.
*/
-Prado.WebUI.TRadioButton = Prado.WebUI.ClickableComponent;
+Prado.WebUI.TRadioButton = Prado.WebUI.createPostBackComponent(Prado.WebUI.ClickableComponent.prototype);
Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize = Prado.WebUI.TRadioButton.prototype.initialize;
Object.extend(Prado.WebUI.TRadioButton.prototype,
{
diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js index 9c443c52..a9943e14 100644 --- a/framework/Web/Javascripts/prado/form.js +++ b/framework/Web/Javascripts/prado/form.js @@ -104,6 +104,10 @@ Prado.PostBack = function(event,options) var canSubmit = true;
if(options['CausesValidation'] && Prado.Validation)
{
+ if(options['ValidationGroup'])
+ Prado.Validation.SetActiveGroup(Event.element(event), options['ValidationGroup']);
+ else
+ Prado.Validation.SetActiveGroup(null,null);
if(Prado.Validation.IsValid(form) == false)
return;
}
diff --git a/framework/Web/Javascripts/prado/validation.js b/framework/Web/Javascripts/prado/validation.js index 8b796cb1..29f1ce82 100644 --- a/framework/Web/Javascripts/prado/validation.js +++ b/framework/Web/Javascripts/prado/validation.js @@ -243,6 +243,12 @@ Prado.Validation.AddTarget = function(id, group) }
}
+Prado.Validation.SetActiveGroup = function(target, group)
+{
+ Prado.Validation.ActiveTarget = target;
+ Prado.Validation.CurrentTargetGroup = group;
+}
+
/**
* Associate a list of validators to a particular control element.
* This essentially allows a set of validators to be grouped to a particular button.
|