diff options
Diffstat (limited to 'framework/Web/Javascripts/js/compressed')
-rw-r--r-- | framework/Web/Javascripts/js/compressed/ajax.js | 4 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/compressed/prado.js | 4 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/compressed/validator.js | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 593b4c15..3c23b1d9 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -89,8 +89,8 @@ Ajax.Responders.register({onComplete:function(request) {if(request.options.HasPriority) Prado.CallbackRequest.tryNextRequest();}});Event.OnLoad(function() {if(typeof Logger!="undefined") -Ajax.Responders.register(Prado.CallbackRequest.Exception);});Prado.CallbackRequest.prototype={url:window.location.href,options:{},id:null,request:null,Enabled:true,initialize:function(id,options) -{this.id=id;this.options=Object.extend({RequestTimeOut:30000,EnablePageStateUpdate:true,HasPriority:true,CausesValidation:true,ValidationGroup:null,PostInputs:true},options||{});},setCallbackParameter:function(value) +Ajax.Responders.register(Prado.CallbackRequest.Exception);});Prado.CallbackRequest.prototype={initialize:function(id,options) +{this.url=window.location.href;this.request=null;this.Enabled=true;this.id=id;this.options=Object.extend({RequestTimeOut:30000,EnablePageStateUpdate:true,HasPriority:true,CausesValidation:true,ValidationGroup:null,PostInputs:true},options||{});},setCallbackParameter:function(value) {this.options['params']=value;},getCallbackParameter:function() {return this.options['params'];},setRequestTimeOut:function(timeout) {this.options['RequestTimeOut']=timeout;},getRequestTimeOut:function() diff --git a/framework/Web/Javascripts/js/compressed/prado.js b/framework/Web/Javascripts/js/compressed/prado.js index 9e0b9ba8..f369a5f3 100644 --- a/framework/Web/Javascripts/js/compressed/prado.js +++ b/framework/Web/Javascripts/js/compressed/prado.js @@ -345,8 +345,8 @@ elements[i].checked=true;}},checkIndices:function(elements,indices) {new Insertion.Top(element,content);},after:function(element,content) {new Insertion.After(element,content);},before:function(element,content) {new Insertion.Before(element,content);}} -Prado.WebUI=Class.create();Prado.WebUI.PostBackControl=Class.create();Prado.WebUI.PostBackControl.prototype={_elementOnClick:null,initialize:function(options) -{this.element=$(options.ID);if(this.onInit) +Prado.WebUI=Class.create();Prado.WebUI.PostBackControl=Class.create();Prado.WebUI.PostBackControl.prototype={initialize:function(options) +{this._elementOnClick=null,this.element=$(options.ID);if(this.onInit) this.onInit(options);},onInit:function(options) {if(typeof(this.element.onclick)=="function") {this._elementOnClick=this.element.onclick;this.element.onclick=null;} diff --git a/framework/Web/Javascripts/js/compressed/validator.js b/framework/Web/Javascripts/js/compressed/validator.js index 7b89084b..95081d50 100644 --- a/framework/Web/Javascripts/js/compressed/validator.js +++ b/framework/Web/Javascripts/js/compressed/validator.js @@ -16,8 +16,8 @@ throw new Error("A validation manager for form '"+formID+"' needs to be created {$H(Prado.Validation.managers).each(function(manager) {manager[1].validators.each(function(validator) {if(validator.options.ID==validatorID) -{validator.options.ErrorMessage=message;$(validatorID).innerHTML=message;}});});}});Prado.ValidationManager=Class.create();Prado.ValidationManager.prototype={validators:[],summaries:[],groups:[],options:{},initialize:function(options) -{this.options=options;Prado.Validation.managers[options.FormID]=this;},validate:function(group,invoker) +{validator.options.ErrorMessage=message;$(validatorID).innerHTML=message;}});});}});Prado.ValidationManager=Class.create();Prado.ValidationManager.prototype={initialize:function(options) +{this.validators=[];this.summaries=[];this.groups=[];this.options={};this.options=options;Prado.Validation.managers[options.FormID]=this;},validate:function(group,invoker) {if(group) return this._validateGroup(group,invoker);else return this._validateNonGroup(invoker);},_validateGroup:function(groupID,invoker) @@ -50,7 +50,7 @@ this.groups.push(validator.group);},addSummary:function(summary) {var validators=this.getValidatorsWithError(group);this.summaries.each(function(summary) {var inGroup=group&&summary.group==group;var noGroup=!group&&!summary.group;if(inGroup||noGroup) summary.updateSummary(validators,refresh);else -summary.hideSummary(true);});}};Prado.WebUI.TValidationSummary=Class.create();Prado.WebUI.TValidationSummary.prototype={group:null,options:{},visible:false,messages:null,initialize:function(options) +summary.hideSummary(true);});}};Prado.WebUI.TValidationSummary=Class.create();Prado.WebUI.TValidationSummary.prototype={initialize:function(options) {this.options=options;this.group=options.ValidationGroup;this.messages=$(options.ID);this.visible=this.messages.style.visibility!="hidden" this.visible=this.visible&&this.messages.style.display!="none";Prado.Validation.addSummary(options.FormID,this);},updateSummary:function(validators,update) {if(validators.length<=0) @@ -85,8 +85,8 @@ this.messages.show();this.visible=true;},formats:function(type) {var output=this.options.HeaderText?this.options.HeaderText+"\n":"";for(var i=0;i<messages.length;i++) {switch(this.options.DisplayMode) {case"List":output+=messages[i]+"\n";break;case"BulletList":default:output+=" - "+messages[i]+"\n";break;case"SingleParagraph":output+=messages[i]+" ";break;}} -return output;}};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,initialize:function(options) -{this.options=options;this.control=$(options.ControlToValidate);this.message=$(options.ID);this.group=options.ValidationGroup;this.manager=Prado.Validation.addValidator(options.FormID,this);},getErrorMessage:function() +return output;}};Prado.WebUI.TBaseValidator=Class.create();Prado.WebUI.TBaseValidator.prototype={initialize:function(options) +{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);this.group=options.ValidationGroup;this.manager=Prado.Validation.addValidator(options.FormID,this);},getErrorMessage:function() {return this.options.ErrorMessage;},updateControl:function(focus) {this.refreshControlAndMessage();if(this.options.FocusOnError&&!this.isValid) Prado.Element.focus(this.options.FocusElementID);this.visible=true;},refreshControlAndMessage:function() |