summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/compressed/ajax.js
diff options
context:
space:
mode:
authorwei <>2006-09-16 03:43:02 +0000
committerwei <>2006-09-16 03:43:02 +0000
commit2d8fc0f1818aa896bebedf8cbeedffb17d048600 (patch)
tree2ef6ea939d5f018598ec2983086354000750fb70 /framework/Web/Javascripts/js/compressed/ajax.js
parentd148330f1fe3cb6116a69e56ecd44c37bfb2a44e (diff)
Fixed #340
Diffstat (limited to 'framework/Web/Javascripts/js/compressed/ajax.js')
-rw-r--r--framework/Web/Javascripts/js/compressed/ajax.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js
index cc7348cd..7e9cf3ec 100644
--- a/framework/Web/Javascripts/js/compressed/ajax.js
+++ b/framework/Web/Javascripts/js/compressed/ajax.js
@@ -50,7 +50,7 @@ Prado.CallbackRequest.Exception.onException(null,e);}}},Exception:{"on500":funct
{var msg='HTTP '+transport.status+" with response : \n";msg+=transport.responseText+"\n";msg+="Data : \n"+inspect(data)+"\n";msg+="Actions : \n";data=request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER);if(data&&data.length>0)
{data.each(function(action)
{msg+=inspect(action)+"\n";});}
-Logger.warn(msg);}},onException:function(request,e)
+Logger.info(msg);}},onException:function(request,e)
{msg="";$H(e).each(function(item)
{msg+=item.key+": "+item.value+"\n";})
Logger.error('Uncaught Callback Client Exception:',msg);},formatException:function(e)
@@ -65,13 +65,15 @@ return null;},dispatchPriorityRequest:function(callback)
{Prado.CallbackRequest.abortRequestInProgress();},callback.options.RequestTimeOut);this.requestInProgress=callback;return true;},dispatchNormalRequest:function(callback)
{new Ajax.Request(callback.url,callback.options);return true;},abortRequestInProgress:function()
{inProgress=Prado.CallbackRequest.requestInProgress;if(inProgress)
-{inProgress.request.transport.abort();clearTimeout(inProgress.timeout);Prado.CallbackRequest.requestInProgress=null;return true;}
+{if(inProgress.request.transport.readyState<4)
+inProgress.request.transport.abort();clearTimeout(inProgress.timeout);Prado.CallbackRequest.requestInProgress=null;return true;}
return false;},updatePageState:function(request,transport)
{pagestate=$(this.FIELD_CALLBACK_PAGESTATE);if(request.options.EnablePageStateUpdate&&request.options.HasPriority&&pagestate)
{data=request.header(this.PAGESTATE_HEADER);if(typeof(data)=="string"&&data.length>0)
pagestate.value=data;else
{if(typeof(Logger)!="undefined")
-Logger.debug("Bad page state:"+data);}}}})
+Logger.warn("Missing page state:"+data);return false;}}
+return true;}})
Ajax.Responders.register({onComplete:function(request)
{if(request.options.HasPriority)
Prado.CallbackRequest.abortRequestInProgress();}});Event.OnLoad(function()