mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Simple function to render a thumbnail
This commit is contained in:
parent
d5e58fd798
commit
e3605001e4
@ -315,6 +315,22 @@ function enableDragAndDrop(element, url, options) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function thumbnailImage(url, options={}) {
|
||||||
|
/* Render a simple thumbnail image from the provided URL */
|
||||||
|
|
||||||
|
if (!url) {
|
||||||
|
url = '/static/img/blank_img.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Support insertion of custom classes
|
||||||
|
|
||||||
|
var html = `<img class='hover-img-thumb' src='${url}'>`;
|
||||||
|
|
||||||
|
return html;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function imageHoverIcon(url) {
|
function imageHoverIcon(url) {
|
||||||
/* Render a small thumbnail icon for an image.
|
/* Render a small thumbnail icon for an image.
|
||||||
* On mouseover, display a full-size version of the image
|
* On mouseover, display a full-size version of the image
|
||||||
|
Loading…
Reference in New Issue
Block a user