I implemented the hook to use Filefield Sources with Imagefield Crop (current dev)
function mymodule_filefield_sources_widgets() {
return array('imagefield_crop_widget');
}
This works fine, but the JavaScript is broken. Clicking on a link above the field does not change the original widget. In Chrome debugger i drilled down to the problem:
$fileFieldElement = $(this).parents('div.form-managed-file:first');
This does not match for Imagefield crop here the
<div class="imagefield-crop-widget form-managed-file clearfix"></div>
is empty.
I changed the JavaScript to
$fileFieldElement = $(this).parents('div.form-type-managed-file:first');
And now it works, but have some more problems with image crop....
Comments
Comment #1
quicksketchPlease do not file questions about your own code as a bug report.
I suggest just using https://drupal.org/project/imagefield_focus, which works directly without any changes.
Comment #2
k4v CreditAttribution: k4v commentedComment #3
SKAUGHTyes, changing to imagefield_focus is one solution. however, is not the ticket request. please reopen.