Commit 082ebc76 authored by Nigel McNie's avatar Nigel McNie
Browse files

Added a 'busy' cursor when performing a json request. Works well on create...

Added a 'busy' cursor when performing a json request. Works well on create view step two, I'll evaluate how it works elsewhere over the next little while.
parent c1cbf2a6
......@@ -196,9 +196,12 @@ function sendjsonrequest(script, data, rtype, successcallback, errorcallback, qu
orig_arguments = arguments;
}
document.documentElement.style.cursor = 'wait';
var d = doXHR(script, xhrOptions);
d.addCallbacks(function (result) {
document.documentElement.style.cursor = '';
var data = evalJSONRequest(result);
var errtype = false;
if (!data.error) {
......@@ -236,6 +239,7 @@ function sendjsonrequest(script, data, rtype, successcallback, errorcallback, qu
}
},
function (e) {
document.documentElement.style.cursor = '';
if (e instanceof MochiKit.Async.XMLHttpRequestError) {
log(e);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment