diff --git a/js/admin-products.js b/js/admin-products.js index 5ade004eb..4e7bdb0e6 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -256,6 +256,11 @@ function displayTabProductById(id, selected, index, stack) $("#product-tab-content-"+id).trigger('loaded'); if (stack && stack[index + 1]) displayTabProductById(stack[index + 1], selected, index + 1, stack); + }, + beforeSend : function(data) + { + // don't display the loading notification bar + clearTimeout(ajax_running_timeout); } }); } diff --git a/js/admin.js b/js/admin.js index 5b9208400..70e7f73cd 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1058,6 +1058,16 @@ function stripHTML(oldString) return newString; } +/** + * Display a loading bar while an ajax call is ongoing. + * + * To prevent the loading bar display for a specific ajax call, set the beforeSend event in your ajax declaration: + * beforeSend : function(data) + { + // don't display the loading notification bar + clearTimeout(ajax_running_timeout); + } + */ function showAjaxOverlay() { $('#ajax_running').slideDown('fast');