CRM-13817 - CRM.status - hide if no endMsg
authorColeman Watts <coleman@civicrm.org>
Mon, 20 Jan 2014 00:48:00 +0000 (16:48 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 20 Jan 2014 04:29:06 +0000 (20:29 -0800)
js/Common.js

index c85d38cb4a3fa8a8cff003ecc273e677d2dad5c5..756147558c1a8b9e7046fc76f612618a01099b39 100644 (file)
@@ -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;
   };