Skip to content

Commit f0713b1

Browse files
committed
summernote attachment thumbnails view tooltip info. Appearance improved
1 parent 9d198e5 commit f0713b1

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/Public/css/panichd.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ h1, h2, h3, h4, h5, h6 {
175175
margin-bottom: 15px;
176176
}
177177

178+
.summernote-text-wrapper .summernote_thumbnail_link {
179+
display: inline-block;
180+
border: 1px solid #eee;
181+
padding: 4px;
182+
border-radius: 5px;
183+
width: 60px;
184+
height: 60px;
185+
}
186+
178187
/*
179188
* Datatable styles
180189
*/

src/Traits/Attachments.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ protected function createAttachmentsFrom($html, $ticket, $comment = false, $coun
8585
// Create link
8686
$link = $dom->createElement('a');
8787
$link->setAttribute('href', \URL::route(Setting::grab('main_route').'.view-attachment', [$attachment->id]));
88+
$link->setAttribute('class', 'summernote_thumbnail_link tooltip-show');
89+
$link->setAttribute('title', $original_filename);
90+
$link->setAttribute('data-pwsp-pid', $attachment->id);
91+
8892

8993
// Append thumbnail in link
9094
$link->appendChild($child_img);

src/Views/shared/photoswipe_files.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<script>
7676
$(function(){
7777
// Modify link for each image in ticket to launch PhotoSwipe
78-
$('.pwsp_gallery_link').click(function(e){
78+
$('.pwsp_gallery_link, .summernote_thumbnail_link').click(function(e){
7979
var openpid = $(this).data('pwsp-pid');
8080
var openindex = 0;
8181

0 commit comments

Comments
 (0)