From ae1925956e75eacc40503e12e613bf32a178cf91 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 10 Jan 2012 09:36:53 +0000 Subject: [PATCH] // Deactivate ajax loading notification for product tabs loading --- js/admin-products.js | 5 +++++ js/admin.js | 10 ++++++++++ 2 files changed, 15 insertions(+) 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');