diff --git a/layouts/v7/modules/Vtiger/resources/Vtiger.js b/layouts/v7/modules/Vtiger/resources/Vtiger.js index 09019627e0fe72af34e380937ccfbd632149d1fd..bb10d576c55b6f5f5559b9b6eae1c25707dd1e4d 100644 --- a/layouts/v7/modules/Vtiger/resources/Vtiger.js +++ b/layouts/v7/modules/Vtiger/resources/Vtiger.js @@ -21,20 +21,25 @@ Vtiger.Class('Vtiger_Index_Js', { * @returns {undefined} */ previewFile: function (e, recordId,attachmentId) { - e.stopPropagation(); - if (recordId) { - var params = { - module: 'ModComments', - view: 'FilePreview', - record: recordId, - attachmentid: attachmentId + e.stopPropagation(); + if (recordId) { + var params = { + module: 'ModComments', + view: 'FilePreview', + record: recordId, + attachmentid: attachmentId + }; + var modalParams = { + cb : function(modalContainer){ + modalContainer.find('.viewer').zoomer(); + }, + 'ignoreScroll' : true }; - app.request.post({data:params}).then(function(err, res){ - app.helper.showModal(res); - jQuery('.filePreview .preview-area').height(jQuery(window).height()-143); - }); - } - }, + app.request.post({data: params}).then(function (err, res) { + app.helper.showModal(res, modalParams); + }); + } + }, /** * Function to show email preview in popup