From 4bad157ee935b658fe8dbacaa550193d41588a69 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 19 Jan 2014 16:48:00 -0800 Subject: [PATCH] CRM-13817 - CRM.status - hide if no endMsg --- js/Common.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/Common.js b/js/Common.js index c85d38cb4a..756147558c 100644 --- a/js/Common.js +++ b/js/Common.js @@ -599,10 +599,14 @@ CRM.validate = CRM.validate || { deferred || (deferred = new $.Deferred()); deferred.done(function(data) { var msg = typeof(endMsg) === 'function' ? endMsg(data) : endMsg; - $('.crm-menubar-status-container', $bar).removeClass('status-busy').addClass('status-done').find('.crm-menubar-status-msg').html(msg); - fadeOut = window.setTimeout(function() { - $('.crm-menubar-status-container', $bar).fadeOut('slow'); - }, 2000); + $('.crm-menubar-status-container', $bar).removeClass('status-busy').addClass('status-done').show().find('.crm-menubar-status-msg').html(msg); + if (msg) { + fadeOut = window.setTimeout(function() { + $('.crm-menubar-status-container', $bar).fadeOut('slow'); + }, 2000); + } else { + $('.crm-menubar-status-container', $bar).hide(); + } }); return deferred; }; -- 2.25.1