From 840854be7886236d46d3408de5a084983373b4c7 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 10 Dec 2006 23:55:49 +0000 Subject: Fixed #470 --- framework/Web/Javascripts/js/debug/ajax.js | 29 ++++++++-------------- framework/Web/Javascripts/js/debug/prado.js | 4 +-- framework/Web/Javascripts/js/debug/validator.js | 33 ++++++++++--------------- 3 files changed, 25 insertions(+), 41 deletions(-) (limited to 'framework/Web/Javascripts/js/debug') diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index e5c05510..9b5fe1ef 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -687,33 +687,24 @@ Event.OnLoad(function() */ Prado.CallbackRequest.prototype = { - /** - * Callback URL, same url as the current page. - */ - url : window.location.href, /** - * Callback options, including onXXX events. + * Prepare and inititate a callback request. */ - options : { }, - + initialize : function(id, options) + { /** - * Callback target ID. E.g. $control->getUniqueID(); + * Callback URL, same url as the current page. */ - id : null, + this.url = window.location.href; - /** - * Current callback request. - */ - request : null, + /** + * Current callback request. + */ + this.request = null; - Enabled : true, + this.Enabled = true; - /** - * Prepare and inititate a callback request. - */ - initialize : function(id, options) - { this.id = id; this.options = Object.extend( { diff --git a/framework/Web/Javascripts/js/debug/prado.js b/framework/Web/Javascripts/js/debug/prado.js index 4ab0a415..61b7f880 100644 --- a/framework/Web/Javascripts/js/debug/prado.js +++ b/framework/Web/Javascripts/js/debug/prado.js @@ -3256,10 +3256,10 @@ Prado.WebUI.PostBackControl = Class.create(); Prado.WebUI.PostBackControl.prototype = { - _elementOnClick : null, //capture the element's onclick function - initialize : function(options) { + this._elementOnClick = null, //capture the element's onclick function + this.element = $(options.ID); if(this.onInit) this.onInit(options); diff --git a/framework/Web/Javascripts/js/debug/validator.js b/framework/Web/Javascripts/js/debug/validator.js index 64ac10e3..f3a37d0f 100644 --- a/framework/Web/Javascripts/js/debug/validator.js +++ b/framework/Web/Javascripts/js/debug/validator.js @@ -168,11 +168,6 @@ Prado.ValidationManager = Class.create(); */ Prado.ValidationManager.prototype = { - validators : [], // list of validators - summaries : [], // validation summaries - groups : [], // validation groups - options : {}, - /** * * options['FormID']* The ID of HTML form to manage. @@ -180,6 +175,11 @@ Prado.ValidationManager.prototype = */ initialize : function(options) { + this.validators = []; // list of validators + this.summaries = []; // validation summaries + this.groups = []; // validation groups + this.options = {}; + this.options = options; Prado.Validation.managers[options.FormID] = this; }, @@ -357,11 +357,6 @@ Prado.ValidationManager.prototype = Prado.WebUI.TValidationSummary = Class.create(); Prado.WebUI.TValidationSummary.prototype = { - group : null, - options : {}, - visible : false, - messages : null, - /** * * options['ID']* Validation summary ID, i.e., an HTML element ID @@ -564,16 +559,6 @@ Prado.WebUI.TValidationSummary.prototype = Prado.WebUI.TBaseValidator = Class.create(); Prado.WebUI.TBaseValidator.prototype = { - enabled : true, - visible : false, - isValid : true, - options : {}, - _isObserving : {}, - group : null, - manager : null, - message : null, - requestDispatched : false, - /** * * options['ID']* Validator ID, e.g. span with message @@ -597,6 +582,14 @@ Prado.WebUI.TBaseValidator.prototype = options.OnSuccess = options.OnSuccess || Prototype.emptyFunction; options.OnError = options.OnError || Prototype.emptyFunction; */ + + this.enabled = true; + this.visible = false; + this.isValid = true; + this._isObserving = {}; + this.group = null; + this.requestDispatched = false; + this.options = options; this.control = $(options.ControlToValidate); this.message = $(options.ID); -- cgit v1.2.3