diff options
author | wei <> | 2006-10-19 00:57:08 +0000 |
---|---|---|
committer | wei <> | 2006-10-19 00:57:08 +0000 |
commit | a36595a1470db259ce9e723f2ad13b63fd5e8eb6 (patch) | |
tree | 3633aff35a82e566d5b89dcfb3c50c284ccfc9d9 /framework/Web/Javascripts | |
parent | ec1c561946e785fb34a4809b8b154e2e4f0ffb8b (diff) |
BC BREAK: Changed Validator property names:
- Validators ClientSide.OnSuccess becomes ClientSide.OnValidationSuccess,
- Validators ClientSide.OnError becomes ClientSide.OnValidationError,
- Validators OnSuccess event becomes OnValidationSuccess.
- Validators OnError event becomes OnValidationError.
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r-- | framework/Web/Javascripts/js/compressed/validator.js | 12 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/debug/validator.js | 14 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/validation3.js | 14 |
3 files changed, 20 insertions, 20 deletions
diff --git a/framework/Web/Javascripts/js/compressed/validator.js b/framework/Web/Javascripts/js/compressed/validator.js index cca77a81..4134ecc3 100644 --- a/framework/Web/Javascripts/js/compressed/validator.js +++ b/framework/Web/Javascripts/js/compressed/validator.js @@ -105,15 +105,15 @@ this.options.OnValidate(this,invoker);} if(this.enabled) this.isValid=this.evaluateIsValid();else this.isValid=true;if(this.isValid) -{if(typeof(this.options.OnSuccess)=="function") +{if(typeof(this.options.OnValidationSuccess)=="function") {if(this.requestDispatched==false) -{this.refreshControlAndMessage();this.options.OnSuccess(this,invoker);}} +{this.refreshControlAndMessage();this.options.OnValidationSuccess(this,invoker);}} else this.updateControl();} else -{if(typeof(this.options.OnError)=="function") +{if(typeof(this.options.OnValidationError)=="function") {if(this.requestDispatched==false) -{this.refreshControlAndMessage();this.options.OnError(this,invoker)}} +{this.refreshControlAndMessage();this.options.OnValidationError(this,invoker)}} else this.updateControl();} this.observeChanges(this.control);return this.isValid;},observeChanges:function(control) @@ -189,8 +189,8 @@ return true;}});Prado.WebUI.TActiveCustomValidator=Class.extend(Prado.WebUI.TBas {value=this.getValidationValue();if(!this.requestDispatched&&value!=this.validatingValue) {this.validatingValue=value;request=new Prado.CallbackRequest(this.options.EventTarget,this.options);request.setCallbackParameter(value);request.setCausesValidation(false);request.options.onSuccess=this.callbackOnSuccess.bind(this);request.options.onFailure=this.callbackOnFailure.bind(this);request.dispatch();this.requestDispatched=true;return false;} return this.isValid;},callbackOnSuccess:function(request,data) -{this.isValid=data;this.requestDispatched=false;Prado.Validation.validate(this.options.FormID,this.group,null);if(typeof(this.options.onSuccess)=="function") -this.options.onSuccess(request,data);},callbackOnFailure:function(request,data) +{this.isValid=data;this.requestDispatched=false;if(typeof(this.options.onSuccess)=="function") +this.options.onSuccess(request,data);Prado.Validation.validate(this.options.FormID,this.group,null);},callbackOnFailure:function(request,data) {this.requestDispatched=false;if(typeof(this.options.onFailure)=="function") this.options.onFailure(request,data);}});Prado.WebUI.TRangeValidator=Class.extend(Prado.WebUI.TBaseValidator,{evaluateIsValid:function() {var value=this.getValidationValue();if(value.length<=0) diff --git a/framework/Web/Javascripts/js/debug/validator.js b/framework/Web/Javascripts/js/debug/validator.js index af429e68..8f244667 100644 --- a/framework/Web/Javascripts/js/debug/validator.js +++ b/framework/Web/Javascripts/js/debug/validator.js @@ -571,8 +571,8 @@ Prado.WebUI.TBaseValidator.prototype = * options['ValidationGroup'] Validation group
* options['ControlCssClass'] Css class to use on the input upon error
* options['OnValidate'] Function to call immediately after validation
- * options['OnSuccess'] Function to call upon after successful validation
- * options['OnError'] Function to call upon after error in validation.
+ * options['OnValidationSuccess'] Function to call upon after successful validation
+ * options['OnValidationError'] Function to call upon after error in validation.
* options['ObserveChanges'] True to observe changes in input
* </code>
*/
@@ -685,12 +685,12 @@ Prado.WebUI.TBaseValidator.prototype = if(this.isValid)
{
- if(typeof(this.options.OnSuccess) == "function")
+ if(typeof(this.options.OnValidationSuccess) == "function")
{
if(this.requestDispatched == false)
{
this.refreshControlAndMessage();
- this.options.OnSuccess(this, invoker);
+ this.options.OnValidationSuccess(this, invoker);
}
}
else
@@ -698,12 +698,12 @@ Prado.WebUI.TBaseValidator.prototype = }
else
{
- if(typeof(this.options.OnError) == "function")
+ if(typeof(this.options.OnValidationError) == "function")
{
if(this.requestDispatched == false)
{
this.refreshControlAndMessage();
- this.options.OnError(this, invoker)
+ this.options.OnValidationError(this, invoker)
}
}
else
@@ -1143,9 +1143,9 @@ Prado.WebUI.TActiveCustomValidator = Class.extend(Prado.WebUI.TBaseValidator, {
this.isValid = data;
this.requestDispatched = false;
- Prado.Validation.validate(this.options.FormID, this.group,null);
if(typeof(this.options.onSuccess) == "function")
this.options.onSuccess(request,data);
+ Prado.Validation.validate(this.options.FormID, this.group,null);
},
callbackOnFailure : function(request, data)
diff --git a/framework/Web/Javascripts/prado/validation3.js b/framework/Web/Javascripts/prado/validation3.js index 8904921f..55ebc095 100644 --- a/framework/Web/Javascripts/prado/validation3.js +++ b/framework/Web/Javascripts/prado/validation3.js @@ -571,8 +571,8 @@ Prado.WebUI.TBaseValidator.prototype = * options['ValidationGroup'] Validation group
* options['ControlCssClass'] Css class to use on the input upon error
* options['OnValidate'] Function to call immediately after validation
- * options['OnSuccess'] Function to call upon after successful validation
- * options['OnError'] Function to call upon after error in validation.
+ * options['OnValidationSuccess'] Function to call upon after successful validation
+ * options['OnValidationError'] Function to call upon after error in validation.
* options['ObserveChanges'] True to observe changes in input
* </code>
*/
@@ -685,12 +685,12 @@ Prado.WebUI.TBaseValidator.prototype = if(this.isValid)
{
- if(typeof(this.options.OnSuccess) == "function")
+ if(typeof(this.options.OnValidationSuccess) == "function")
{
if(this.requestDispatched == false)
{
this.refreshControlAndMessage();
- this.options.OnSuccess(this, invoker);
+ this.options.OnValidationSuccess(this, invoker);
}
}
else
@@ -698,12 +698,12 @@ Prado.WebUI.TBaseValidator.prototype = }
else
{
- if(typeof(this.options.OnError) == "function")
+ if(typeof(this.options.OnValidationError) == "function")
{
if(this.requestDispatched == false)
{
this.refreshControlAndMessage();
- this.options.OnError(this, invoker)
+ this.options.OnValidationError(this, invoker)
}
}
else
@@ -1143,9 +1143,9 @@ Prado.WebUI.TActiveCustomValidator = Class.extend(Prado.WebUI.TBaseValidator, {
this.isValid = data;
this.requestDispatched = false;
- Prado.Validation.validate(this.options.FormID, this.group,null);
if(typeof(this.options.onSuccess) == "function")
this.options.onSuccess(request,data);
+ Prado.Validation.validate(this.options.FormID, this.group,null);
},
callbackOnFailure : function(request, data)
|