summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/Javascripts/source/prado/validator/validation3.js28
2 files changed, 23 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index 848f955a..67147293 100644
--- a/HISTORY
+++ b/HISTORY
@@ -10,6 +10,7 @@ BUG: Ticket#750 - The "expire" parameter is used inconsistently in cache modules
BUG: Ticket#753 - Themes not allways being set (Qiang)
BUG: Ticket#754 - CultureInfo constructor errors (Qiang)
BUG: Ticket#759 - TSlider wrong layout with horizontal with center horizontal align (Christophe)
+BUG: Ticket#769 - Problem with Validator inside TActivePanel (Christophe)
BUG: Ticket#776 - Logout button should not cause validation in blog tutorial (Qiang)
BUG: Ticket#785 - TDatePicker OnDateChanged event problem (Christophe)
BUG: Ticket#787 - Typo in validation3.js (Christophe)
diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js
index ffdbe7b0..45e9aa43 100644
--- a/framework/Web/Javascripts/source/prado/validator/validation3.js
+++ b/framework/Web/Javascripts/source/prado/validator/validation3.js
@@ -186,14 +186,25 @@ Prado.ValidationManager.prototype =
*/
initialize : function(options)
{
- this.validators = []; // list of validators
- this.summaries = []; // validation summaries
- this.groups = []; // validation groups
- this.options = {};
-
- this.options = options;
if(!Prado.Validation.managers[options.FormID])
+ {
+ this.validators = []; // list of validators
+ this.summaries = []; // validation summaries
+ this.groups = []; // validation groups
+ this.options = {};
+
+ this.options = options;
+
Prado.Validation.managers[options.FormID] = this;
+ }
+ else
+ {
+ var manager = Prado.Validation.managers[options.FormID];
+ this.validators = manager.validators;
+ this.summaries = manager.summaries;
+ this.groups = manager.groups;
+ this.options = manager.options;
+ }
},
/**
@@ -286,6 +297,11 @@ Prado.ValidationManager.prototype =
*/
addValidator : function(validator)
{
+ // Erase any existing validator with same options
+ this.validators = this.validators.reject(function(v)
+ {
+ return (v.options.ID==validator.options.ID);
+ });
this.validators.push(validator);
if(validator.group && !this.groups.include(validator.group))
this.groups.push(validator.group);