Index: /extensions/Crop_Image/crop_image.tpl
===================================================================
--- /extensions/Crop_Image/crop_image.tpl (revision 22849)
+++ /extensions/Crop_Image/crop_image.tpl (revision 22849)
@@ -0,0 +1,64 @@
+
+
{$TITLE} › {'Edit photo'|@translate} {$TABSHEET_TITLE}
+
+{if $IN_CROP}
+
+{combine_css path="themes/default/js/plugins/jquery.Jcrop.css"}
+{combine_script id='jquery.jcrop' load='footer' require='jquery' path='themes/default/js/plugins/jquery.Jcrop.min.js'}
+
+{footer_script require="jquery"}
+var jcrop_api;
+
+jQuery("#jcrop").Jcrop({ldelim}
+ //boxWidth: {$crop.display_width},
+ //boxHeight: {$crop.display_height},
+ boxWidth: 500, boxHeight: 400,
+ onChange: jOnChange,
+ onRelease: jOnRelease
+ },
+ function(){ldelim}
+ jcrop_api = this;
+ });
+
+function jOnChange(sel) {ldelim}
+ jQuery("input[name='x']").val(sel.x);
+ jQuery("input[name='y']").val(sel.y);
+ jQuery("input[name='x2']").val(sel.x2);
+ jQuery("input[name='y2']").val(sel.y2);
+
+ jQuery("input[name='w']").val(sel.w);
+ jQuery("input[name='h']").val(sel.h);
+
+ jQuery("#width").html(Math.round(sel.x2-sel.x).toFixed(0));
+ jQuery("#height").html(Math.round(sel.y2-sel.y).toFixed(0));
+}
+ function jOnRelease() {ldelim}
+
+}
+
+{/footer_script}
+
+
+{/if}