From b8f0ecb134d7fa2bba970ec529144eb2e804879a Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 6 Jul 2015 14:28:36 +0000 Subject: [PATCH] Bug fix: don't accept attachments (like images) via Chrome's copy/paste since it may duplicate the text content of a normal copy/paste and moreover causes troubles because there is no file name associated with the pasted content. SVN:trunk[3621] --- datamodels/2.x/itop-attachments/main.attachments.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datamodels/2.x/itop-attachments/main.attachments.php b/datamodels/2.x/itop-attachments/main.attachments.php index 52c0a2f51..90408fb6b 100755 --- a/datamodels/2.x/itop-attachments/main.attachments.php +++ b/datamodels/2.x/itop-attachments/main.attachments.php @@ -250,6 +250,7 @@ EOF $('#attachment_plugin').trigger('remove_attachment', [att_id]); return false; // Do not submit the form ! } + function ajaxFileUpload() { //starting setting some animation when the ajax starts and completes @@ -368,6 +369,7 @@ $oPage->add_ready_script( url: GetAbsoluteUrlModulesRoot()+'itop-attachments/ajax.attachment.php', formData: { operation: 'add', temp_id: '$sTempId', obj_class: '$sClass' }, dataType: 'json', + pasteZone: null, // Don't accept files via Chrome's copy/paste done: function (e, data) { if(typeof(data.result.error) != 'undefined') {