Skip to content

Implemented came_from Parameter #19

wants to merge 1 commit into from

4 participants

Kosi81 commented Mar 28, 2013

Use Case:

We implemented a direct Link from Overview Views (@the specific cropped Image) to the croppingeditor. Editor should have possibility to go to Imagecropping directly and come back to specific overview page. Therefore we give UUID of Page to croppingeditor and give Link to come back.


Some more background info on this request:
It would allow to offer users a direct access from the context of where an image (with a certain scale is displayed) to the cropping editor and back again.

A custom BrowserView that aggregates content and displays several images. Users with editor permissions on an image get to see a cropping symbol on mouse-over (the JavaScript code for this is not part of this pull request - but it might make sense to add it to the README as an example). The link to the cropping editor contains the image scale and the context's UID, e.g.

UI example:

The cropping editor already allows pre-selection of scale via request parameter. We just need to provide way for the user to get back to the original context. Therefore, after a Save or Delete Scale operation, a link back to the original context is provided, if a came_from parameter is present:


A click on Cancel causes an immediate redirect back to the original context, if a came_from parameter is present.

This behaviour should be in line with some deliberations in #9: "another possible - and as we think most intuitive - way to access the croppingeditor would be a cropping button displayed over images."

Plone Collective member

I'd rather suggest to use the overlay solution as mentioned in the documentation. since cropping only works when javascript is enabled you don't need to load the whole cropping page:

(function($) {
    $(function() {

        $(document).bind("formOverlayLoadSuccess", function() {

but thats my oppinion ...

Plone Collective member
petschki commented Apr 2, 2013

since this is an open discussion in general, i'd like to invite you to post your oppinion/experience on #12

Plone Collective member
frisi commented Apr 2, 2013

thanks @Kosi81 for the initiative and @pysailor for the detailed description. as you pointed out we outlined "the crop-link displayed over croppable images" for more usability in #9.

after that we started ticket #12 as a feature request to make this happen.

if i understand correctly, you want to achieve the very same goal with this feature request, don't you?
if yes - let's move the discussion to #12 as suggested by @petschki.

i do share his point of view that it is more elegant/fast(no page reload)/user-friendly to display the croppingeditor in an overlay for this usecase. (after all we just need to display the editor and can skip the left columns for selecting fields and scales.)

thanks for your feedback!

Kosi81 commented Apr 8, 2013

Sorry for the late answer. We have now implemented this with the suggested solutions. Works great! Thx, a lot for this tip. So i will clode the pull request!

@Kosi81 Kosi81 closed this Apr 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.