diff options
Diffstat (limited to 'framework/Web/Javascripts/js/compressed')
-rw-r--r-- | framework/Web/Javascripts/js/compressed/ajax.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 1040070d..d1698aa5 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -41,7 +41,11 @@ return Prado.Element.extractContent(this.transport.responseText,name);},getJsonD catch(e) {if(typeof(json)=="string") return Prado.CallbackRequest.decode(json);}},getBodyDataPart:function(name) -{return this.getJsonData(this.getBodyContentPart(name));}});Prado.CallbackRequest=Class.create();Object.extend(Prado.CallbackRequest,{FIELD_CALLBACK_TARGET:'PRADO_CALLBACK_TARGET',FIELD_CALLBACK_PARAMETER:'PRADO_CALLBACK_PARAMETER',FIELD_CALLBACK_PAGESTATE:'PRADO_PAGESTATE',FIELD_POSTBACK_TARGET:'PRADO_POSTBACK_TARGET',FIELD_POSTBACK_PARAMETER:'PRADO_POSTBACK_PARAMETER',PostDataLoaders:[],DATA_HEADER:'X-PRADO-DATA',ACTION_HEADER:'X-PRADO-ACTIONS',ERROR_HEADER:'X-PRADO-ERROR',PAGESTATE_HEADER:'X-PRADO-PAGESTATE',REDIRECT_HEADER:'X-PRADO-REDIRECT',requestQueue:[],addPostLoaders:function(ids) +{return this.getJsonData(this.getBodyContentPart(name));}});Prado.CallbackRequest=Class.create();Object.extend(Prado.CallbackRequest,{FIELD_CALLBACK_TARGET:'PRADO_CALLBACK_TARGET',FIELD_CALLBACK_PARAMETER:'PRADO_CALLBACK_PARAMETER',FIELD_CALLBACK_PAGESTATE:'PRADO_PAGESTATE',FIELD_POSTBACK_TARGET:'PRADO_POSTBACK_TARGET',FIELD_POSTBACK_PARAMETER:'PRADO_POSTBACK_PARAMETER',PostDataLoaders:[],DATA_HEADER:'X-PRADO-DATA',ACTION_HEADER:'X-PRADO-ACTIONS',ERROR_HEADER:'X-PRADO-ERROR',PAGESTATE_HEADER:'X-PRADO-PAGESTATE',REDIRECT_HEADER:'X-PRADO-REDIRECT',requestQueue:[],requests:{},getRequestById:function(id) +{var requests=Prado.CallbackRequest.requests;if(typeof(requests[id])!="undefined") +return requests[id];},dispatch:function(id) +{var requests=Prado.CallbackRequest.requests;if(typeof(requests[id])!="undefined") +requests[id].dispatch();},addPostLoaders:function(ids) {var self=Prado.CallbackRequest;self.PostDataLoaders=self.PostDataLoaders.concat(ids);var list=[];self.PostDataLoaders.each(function(id) {if(list.indexOf(id)<0) list.push(id);});self.PostDataLoaders=list;},dispatchActions:function(transport,actions) @@ -95,7 +99,8 @@ Ajax.Responders.register({onComplete:function(request) Prado.CallbackRequest.tryNextRequest();}});Event.OnLoad(function() {if(typeof Logger!="undefined") 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.url=window.location.href;this.request=null;this.Enabled=true;this.id=id;if(typeof(id)=="string") +Prado.CallbackRequest.requests[id]=this;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() |