2
0
forked from Wavyzz/dolibarr

NEW Enhance popup for image preview (show size in title, can restore

small view, always show the Rotate button).
This commit is contained in:
ldestailleur
2025-07-23 14:43:51 +02:00
parent 8f3b65976a
commit 3844c65e89
4 changed files with 49 additions and 35 deletions

View File

@@ -233,7 +233,11 @@ if ($conf->browser->layout != 'phone') {
// Click on the preview picto
jQuery(".documentpreview").click(function () {
console.log("We click on preview for element with href="+$(this).attr(\'href\')+" mime="+$(this).attr(\'mime\'));
document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \''.dol_escape_js($langs->transnoentities("Preview")).'\');
var titledocpreview = $(this).attr(\'data-title\');
if (titledocpreview == undefined || titledocpreview == "") {
titledocpreview = \''.dol_escape_js($langs->transnoentities("Preview")).'\'
}
document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), titledocpreview);
return false;
});
});'."\n";