Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a button to rotate image in preview of file attached list #24318

Closed
vmaury opened this issue Mar 22, 2023 · 1 comment
Closed

Add a button to rotate image in preview of file attached list #24318

vmaury opened this issue Mar 22, 2023 · 1 comment
Labels
Feature request This is a feature request Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@vmaury
Copy link
Contributor

vmaury commented Mar 22, 2023

Feature Request

Everything's in the title.
Sometimes some people join a rotated image and as it's not so simple to rotate a desktop's screen

Very simple solution :
arround line #1039 of /htdocs/core/js/lib_head.js.php
replace / add

optionsbuttons = {}
		if (mode == 'image' && showOriginalSizeButton)
		{
			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" }); }

by

var curRot = 0; // add this line
optionsbuttons = {}
		if (mode == 'image' && showOriginalSizeButton)
		{
			optionsbuttons = {
                               "Rotation": function() { curRot += 90; jQuery(".ui-dialog-content.ui-widget-content > object").css("transform","rotate(" + curRot + "deg)"); },  // add this line
				"<?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" }); }
```,



### Use case

_No response_

### Suggested implementation

_No response_

### Suggested steps

_No response_
Copy link

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Mar 21, 2024
@github-actions github-actions bot closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request This is a feature request Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

No branches or pull requests

1 participant