From c2429f2d05622c803d9e565659619725c9341547 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 12 Feb 2015 18:03:36 +0000 Subject: [PATCH] - Properly handle "suggested" attachments - Properly pass the name of the uploaded file to the internal JS event SVN:2.1.0[3497] --- datamodels/2.x/itop-attachments/main.attachments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/itop-attachments/main.attachments.php b/datamodels/2.x/itop-attachments/main.attachments.php index 3f72eb5656..b82d20d910 100755 --- a/datamodels/2.x/itop-attachments/main.attachments.php +++ b/datamodels/2.x/itop-attachments/main.attachments.php @@ -1,5 +1,5 @@ IsPreviewAvailable() ? 'true' : 'false'; - $oPage->add('

'.$sFileName.'

  
'); + $oPage->add('

'.$sFileName.'

  
'); $oPage->add_ready_script("$('#attachment_plugin').trigger('add_attachment', [$iAttId, '".addslashes($sFileName)."']);"); } } @@ -383,7 +383,7 @@ $oPage->add_ready_script( { $('#display_attachment_'+data.result.att_id).hover( function() { $(this).children(':button').toggleClass('btn_hidden'); } ); } - $('#attachment_plugin').trigger('add_attachment', [data.result.att_id, data.msg]); + $('#attachment_plugin').trigger('add_attachment', [data.result.att_id, data.result.msg]); } } },