diff --git a/modules/itop-attachments/model.attachments.php b/modules/itop-attachments/model.attachments.php index d89a689a7..8b6835624 100644 --- a/modules/itop-attachments/model.attachments.php +++ b/modules/itop-attachments/model.attachments.php @@ -389,6 +389,7 @@ EOF { $('#attachment_'+att_id).attr('name', 'removed_attachments[]'); $('#display_attachment_'+att_id).hide(); + $('#attachment_plugin').trigger('remove_attachment', [att_id]); return false; // Do not submit the form ! } function ajaxFileUpload() @@ -433,6 +434,8 @@ EOF { $('#display_attachment_'+data.att_id).hover( function() { $(this).children(':button').toggleClass('btn_hidden'); } ); } + $('#attachment_plugin').trigger('add_attachment', [data.att_id, data.msg]); + //alert(data.msg); } } @@ -465,6 +468,7 @@ EOF $oPage->p(Dict::S('Attachments:AddAttachment').' '.$sMaxUpload); //$oPage->p(''); $oPage->p(''); + $oPage->p(''); $oPage->add(''); if ($this->m_bDeleteEnabled) {