[patch] Added option to hide spinner / progress in ajax call

This commit is contained in:
Rushabh Mehta 2013-12-04 11:26:46 +05:30
parent 6dcc4a7cdf
commit 03adcd8da1

View file

@ -42,7 +42,7 @@ $.extend(wn, {
wn.process_response(opts, data);
},
error: function(response) {
NProgress.done();
if(!opts.no_spinner) NProgress.done();
console.error ? console.error(response) : console.log(response);
}
});
@ -75,7 +75,9 @@ $.extend(wn, {
}
});
NProgress.start();
if(!opts.no_spinner) {
NProgress.start();
}
},
process_response: function(opts, data) {
NProgress.done();