forked from Wavyzz/dolibarr
New 24318 Add Rotate_Image_Button in Preview (#25052)
This commit is contained in:
@@ -1048,9 +1048,11 @@ function document_preview(file, type, title)
|
||||
|
||||
optionsbuttons = {}
|
||||
if (mode == 'image' && showOriginalSizeButton)
|
||||
{
|
||||
{
|
||||
var curRot = 0;
|
||||
optionsbuttons = {
|
||||
"<?php echo dol_escape_js($langs->transnoentitiesnoconv("OriginalSize")); ?>": function() { console.log("Click on original size"); jQuery(".ui-dialog-content.ui-widget-content > object").css({ "max-height": "none" }); },
|
||||
"<?php echo dol_escape_js($langs->transnoentitiesnoconv("RotateImage")); ?>": function() { curRot += 90; jQuery(".ui-dialog-content.ui-widget-content > object").css("transform","rotate(" + curRot + "deg)"); },
|
||||
"<?php echo dol_escape_js($langs->transnoentitiesnoconv("CloseWindow")); ?>": function() { $( this ).dialog( "close" ); }
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user