From: Coleman Watts Date: Mon, 20 Jan 2014 00:48:00 +0000 (-0800) Subject: CRM-13817 - CRM.status - hide if no endMsg X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4bad157ee935b658fe8dbacaa550193d41588a69;p=civicrm-core.git CRM-13817 - CRM.status - hide if no endMsg --- 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; };