[MGNLIMG-25] Remove crop/preview when removing file/binary Created: 27/Jun/07 Updated: 05/Dec/13 Resolved: 05/Dec/13 |
|
| Status: | Closed |
| Project: | Imaging |
| Component/s: | crop ui |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | verify | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Patch included: |
Yes
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
This is maybe not valid anymore with 2.0, to be validated |
| Comments |
| Comment by Frank Sommer [ 24/Sep/08 ] |
|
We have fix this issue and some further bugs for us. How can I contribute the changes to the module and the community? |
| Comment by Frank Sommer [ 24/Sep/08 ] |
...
/**
* @param storageNode where the resized image should be stored
* @param dialogControlConfigNode where the control is configured (for targetWidth and targetHeight)
*/
public void processImages(Content storageNode, Content dialogControlConfigNode) throws RepositoryException, IOException {
// let'name loop through all properties, see which ones are binaries and see if they have a corresponding cropperInfo
int index = dialogControlConfigNode.getName().indexOf("Crop");
String imageName = dialogControlConfigNode.getName().substring(0, index);
NodeData image = storageNode.getNodeData(imageName);
if (image != null) {
final String targetBinaryProperty = CropAndResizeControl.getTargetBinaryPropertyName(imageName);
if (image.getType() == PropertyType.BINARY) {
final String potentialCropperInfoProperty = CropAndResizeControl.getCropperInfoPropertyName(imageName);
if (storageNode.hasNodeData(potentialCropperInfoProperty)) {
final NodeData filteringParams = storageNode.getNodeData(potentialCropperInfoProperty);
final NodeData target = NodeDataUtil.getOrCreate(storageNode, targetBinaryProperty, PropertyType.BINARY);
processImage(image, filteringParams, target, dialogControlConfigNode);
}
} else if (storageNode.hasNodeData(targetBinaryProperty)) {
// deletes the thumbnail and the cropper info node
storageNode.deleteNodeData(targetBinaryProperty);
String cropperNodeName = CropAndResizeControl.getCropperInfoPropertyName(imageName);
if (storageNode.hasNodeData(cropperNodeName)) {
storageNode.deleteNodeData(cropperNodeName);
}
}
}
}
...
|
| Comment by Magnolia International [ 24/Sep/08 ] |
|
Hi Frank, thanks, awesome ! |
| Comment by Magnolia International [ 26/Sep/08 ] |
|
Frank, I'm afraid I'm not going to be able to use this patch: |
| Comment by Christopher Zimmermann [ 05/Dec/13 ] |
|
Crop UI has been superceded by 5 series image editor. |