Closed frisi closed 10 years ago
@skaeser before merging i'd of course add a upgrade step for the javascript registration. before that i'd like to hear your general feedback and whether you tend to add the crop key in manageble or in components that provide manageble lists of croppable images
@skaeser @wag i now added the the upgrade step for the javascript registration.
i also integrated the getScale method in https://github.com/webmeisterei/raptus.article.teaser/commit/a7d0150e3e6113e514ac2a2157639a50c5a48e5c to be able to decide whether to show the cropping link or not.
example usage in raptus.article.listings see: https://github.com/webmeisterei/raptus.article.listings/commit/ec33867461b1fcf6552d2dcabc7abaedd60ff5a0
Looks good to me. For future additions of features to manageable items we should probably consider a plugin architecture (named adapter lookups) but this is ok for now.
Are the changes in webmeisterei/raptus.article.teaser@a7d0150e3e6113e514ac2a2157639a50c5a48e5c required for all this to work? if so, could you issue pull request for those too?
Thanks for your work!
thanks for merging @skaeser! of course, the changes in r.a.teaser are necessary as well. there was already an older pull request i added my more recent changes to: https://github.com/Raptus/raptus.article.teaser/pull/3
just noticed that the changes in javascript that require a slightly different structure for the component (https://github.com/Raptus/raptus.article.core/commit/17d17ad9f27e7f80c487015d429d51bf0ab8f795) will require adaptions in raptus.article.listings as well to make the images refresh after defining a crop. i'll submit a pull for these in a few weeks when i'll be updating the project where i'm using this component.
this pull request adds a cropping action to the list of manageable items if a component adds a
crop
key to all items in the list.this is how it looks like:
example usage: https://github.com/webmeisterei/raptus.article.imageslider/commit/42239479d232a7c0dc35e56d96ddd089050a875f
i first wanted to add these links in raptus.article.core.manageable directly (so components need not add the crop key) but ran into a problem basically this is what i tried to do:
the scale property however, is available on the viewlet, and not the component. (since it's configurable via a property) https://github.com/webmeisterei/raptus.article.imageslider/blob/master/raptus/article/imageslider/browser/slider.py#L59