From 3c5722c6d7545773b689144fc1cf3d409d22242c Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Tue, 23 May 2017 22:14:32 -0400 Subject: [PATCH] Getting started on inline attachment viewing --- inc/view_attachment_functions.inc.php | 13 ++++++++++++- js/modsForHesk-javascript.js | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index 23581584..a5259213 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -44,10 +44,21 @@ function mfh_listAttachments($attachments = '', $reply = 0, $is_staff) if ($path == '') { echo ''; } else { - echo ' + echo ' ' . $hesklang['image'] . ' '; } + } elseif (in_array($fontAwesomeIcon, array('fa fa-file-word-o', 'fa fa-file-excel-o', 'fa fa-file-powerpoint-o'))) { + //-- Get the actual image location and display a thumbnail. It will be linked to a modal to view a larger size. + $path = mfh_getSavedNameUrlForAttachment($att_id, $is_staff); + + if ($path == '') { + echo ''; + } else { + echo ' + + '; + } } else { //-- Display the FontAwesome icon in the panel's body echo ''; diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index eefd257c..cfac6bac 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -88,7 +88,6 @@ var loadJquery = function() $('[data-toggle="lightbox"]').magnificPopup({ delegate: 'a[data-toggle="lightbox-item"]', - type: 'image', gallery: { enabled: true },