Use CRM.alert for success msg
authorColeman Watts <coleman@civicrm.org>
Fri, 5 Apr 2013 22:53:22 +0000 (15:53 -0700)
committerColeman Watts <coleman@civicrm.org>
Fri, 5 Apr 2013 22:53:22 +0000 (15:53 -0700)
templates/CRM/Form/attachmentjs.tpl

index 1f83b8030ccec1a5cd2677165b7c189ba08e907f..0c1dbcb38291f279048dc13ed7f80c2cb9cb81a1 100644 (file)
@@ -17,9 +17,9 @@
       url: postUrl,
       success: function(html){
         var resourceBase   = {/literal}"{$config->resourceBase}"{literal};
-        var successMsg = '{/literal}{ts escape="js"}The selected attachment has been deleted.{/ts}{literal} &nbsp;&nbsp;<a href="#" onclick="hideStatusAttachment( \'' + divName + '\'); return false;"><img title="{/literal}{ts escape='js'}close{/ts}{literal}" src="' +resourceBase+'i/close.png"/></a>';
-        cj( divFile ).hide( );
-        cj( divName ).show( ).html( successMsg );
+        var successMsg = '{/literal}{ts escape="js"}The selected attachment has been deleted.{/ts}{literal}';
+        cj(divFile + ',' + divName).hide();
+        CRM.alert(successMsg, '{/literal}{ts escape="js"}Removed{/ts}{literal}', 'success');
       }
     });
   }