Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-25-11-27-40
[civicrm-core.git] / templates / CRM / Form / attachmentjs.tpl
index 098a15b270a03cc8e7c037ad864fbefecf1bb4e1..19823c2637440e1ad3758948caf607e432344293 100644 (file)
@@ -1,7 +1,7 @@
 <script type="text/javascript">
 {literal}
   CRM.$(function($) {
-    $('a.delete-attachment').click(function(e) {
+    $('a.delete-attachment').off('.crmAttachments').on('click.crmAttachments', function(e) {
       var $el = $(this),
         $row = $el.closest('.crm-attachment-wrapper'),
         msg = '{/literal}{ts escape="js" 1="%1"}This will immediately delete the file %1. This action cannot be undone.{/ts}{literal}';