mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 02:05:16 +02:00
Show higher resolution thumbnail when hover over a table picture.
Also use thumbnails for attachment edit preview.
This commit is contained in:
parent
a545e04554
commit
4c7767feed
9 changed files with 35 additions and 12 deletions
|
@ -532,10 +532,12 @@ class AjaxUI {
|
|||
//Set the correct title in the table.
|
||||
let title = $('#part-card-header-src');
|
||||
$('#part-card-header').html(title.html());
|
||||
$(document).trigger('ajaxUI:dt_loaded');
|
||||
|
||||
//Attach event listener to update links after new page selection:
|
||||
$('#dt').on('draw.dt', function() {
|
||||
ajaxUI.registerLinks();
|
||||
$(document).trigger('ajaxUI:dt_loaded');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -304,6 +304,15 @@ $(document).on("ajaxUI:reload ajaxUI:start", function () {
|
|||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Load the higher resolution version of hover pictures.
|
||||
*/
|
||||
$(document).on("ajaxUI:reload ajaxUI:start ajaxUI:dt_loaded", function () {
|
||||
$(".hoverpic[data-thumbnail]").mouseenter(function() {
|
||||
$(this).attr('src', $(this).data('thumbnail'));
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
* Register the button which is used to
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue