Getting started on inline attachment viewing
This commit is contained in:
parent
8e22dd10a8
commit
3c5722c6d7
@ -44,10 +44,21 @@ function mfh_listAttachments($attachments = '', $reply = 0, $is_staff)
|
|||||||
if ($path == '') {
|
if ($path == '') {
|
||||||
echo '<i class="fa fa-ban fa-4x" data-toggle="tooltip" title="' . $hesklang['attachment_removed'] . '"></i>';
|
echo '<i class="fa fa-ban fa-4x" data-toggle="tooltip" title="' . $hesklang['attachment_removed'] . '"></i>';
|
||||||
} else {
|
} else {
|
||||||
echo '<a href="' . $path . '" data-toggle="lightbox-item">
|
echo '<a href="' . $path . '" data-toggle="lightbox-item" class="mfp-image">
|
||||||
<img src="' . $path . '" alt="' . $hesklang['image'] . '" data-toggle="tooltip" title="' . $hesklang['click_to_preview'] . '">
|
<img src="' . $path . '" alt="' . $hesklang['image'] . '" data-toggle="tooltip" title="' . $hesklang['click_to_preview'] . '">
|
||||||
</a>';
|
</a>';
|
||||||
}
|
}
|
||||||
|
} 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 '<i class="fa fa-ban fa-4x" data-toggle="tooltip" title="' . $hesklang['attachment_removed'] . '"></i>';
|
||||||
|
} else {
|
||||||
|
echo '<a class="mfp-iframe" data-toggle="lightbox-item" href="https://view.officeapps.live.com/op/embed.aspx?src=' . $path . '">
|
||||||
|
<i class="' . $fontAwesomeIcon . ' fa-4x"></i>
|
||||||
|
</a>';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//-- Display the FontAwesome icon in the panel's body
|
//-- Display the FontAwesome icon in the panel's body
|
||||||
echo '<i class="' . $fontAwesomeIcon . ' fa-4x"></i>';
|
echo '<i class="' . $fontAwesomeIcon . ' fa-4x"></i>';
|
||||||
|
@ -88,7 +88,6 @@ var loadJquery = function()
|
|||||||
|
|
||||||
$('[data-toggle="lightbox"]').magnificPopup({
|
$('[data-toggle="lightbox"]').magnificPopup({
|
||||||
delegate: 'a[data-toggle="lightbox-item"]',
|
delegate: 'a[data-toggle="lightbox-item"]',
|
||||||
type: 'image',
|
|
||||||
gallery: {
|
gallery: {
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user