control panel: sometimes the ajax loading modal would show after operations were already done

Needed to add the clearQueue flag to jQuery's stop() method
This commit is contained in:
Joshua Tauberer
2015-05-03 13:43:38 +00:00
parent f0143fd6c9
commit f1760b516d
+1 -1
View File
@@ -274,7 +274,7 @@ function ajax(options) {
function hide_loading_indicator() { function hide_loading_indicator() {
ajax_num_executing_requests--; ajax_num_executing_requests--;
if (ajax_num_executing_requests == 0) if (ajax_num_executing_requests == 0)
$('#ajax_loading_indicator').stop().hide(); // stop() prevents an ongoing fade from causing the thing to be shown again after this call $('#ajax_loading_indicator').stop(true).hide(); // stop() prevents an ongoing fade from causing the thing to be shown again after this call
} }
var old_success = options.success; var old_success = options.success;
var old_error = options.error; var old_error = options.error;