It doesn't currently work in D7, though the actual image rotation does work on submit of the Manage Items form. The live preview currently requires jQuery UI, so this is related to #1809442: jQuery UI Sorting.

Comments

quicksketch’s picture

Assigned: Unassigned » quicksketch
Status: Active » Needs review
StatusFileSize
new6.25 KB

This is a pretty easy fix, but honestly I'd like to see the way this is done reworked. What's the point of the modal dialog? Why not just rotate the preview we already have when the user clicks the radio button?

We can save that change for later, but this gets us the direct port of the functionality that is there already.

This patch also removes all checks for module_exists('jquery_ui'), since jQuery UI is built into core now, and it's unnecessary to require the latest version.

zengenuity’s picture

I agree that it should not require a modal popup. It didn't in D6. Perhaps @scroogie can tell us why this functionality was dependent on jquery_ui before. (The code in the D7 module is left over from the D6 version.) It doesn't seem that it should, since it it didn't require a modal, but having only taken over for the D7 port, I'm not sure why it was done the way it was done before.

quicksketch’s picture

StatusFileSize
new7.71 KB

Here's a patch that rotates the existing preview image and removes all trace of the modal popup for rotating the image. I find the presence of the "rotate" link UI clutter that isn't particularly helpful. Since all sites have jQuery UI now (and this link wasn't controlled by the use_jquery_ui setting anyway), all sites would have displayed this option.

quicksketch’s picture

StatusFileSize
new7.56 KB

Removing some extra calls to jQuery UI. If we're not using it on that page anymore we don't need to add it.

scroogie’s picture

Hi zengenuity, quicksketch,

the UI was a wish by the former main maintainer justintime. To quote him:

"Second, I just don't like the UI yet. It's certainly functional, but a lot of users may not know what CW and CCW mean. I just hit flickr to see what they do, and it's pretty impressive. What if you had a link on each row that says simply "rotate", and when clicked, it presented a popup div that showed a preview thumbnail of all three possible rotations, allowing the user to select which they want?"

So I implemented that option. The issue is here: #998808: Rotate images on Manage images tab

To be honest, I even liked that option usability wise. But that of course is a matter of taste. I think it was a nice feature in the D6 version, and removing the modal dialog is just a small change.

zengenuity’s picture

Okay, now that I'm really digging into the page, there a bigger problem here. NGAPI currently uses the thumbnail file view mode that is defined in NG. That's not going to work. I need to bring back the "admin thumbnail" from the D6 version.

Now that I see the rotation popup working properly, it is a nice feature usability-wise. I want to keep it. If anything, the radio buttons add more visual clutter than the link. I've reworked this feature, so both are shown by default, but either of them can be turned off in the relationship type settings. (under the enable rotation checkbox) I also added a tabledrag-style warning that the form needs to be saved after rotating. I think it's a little confusing when you see the image actually rotate. You might think you're done. (particularly when you've clicked okay on the popup)

Please try the attached patch. It includes all the changes above. You need to run a db update to get the new view mode configured properly.

zengenuity’s picture

Re-rolled patch against HEAD.

quicksketch’s picture

Thanks zengenuity, clearly an option is going to be a useful thing for users wanting to choose. Agreed about the "admin thumbnail" too. I won't get a chance to check this out until this coming week, thanks for the reroll! :)

zengenuity’s picture

Status: Needs review » Fixed

Committed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.