dir/view/cropbody.tpl
Roland Häder c353b31569
Cleanups:
- don't commit files that are being ignored, better provide a "template" file
  that needs copying to the right file and ignore the file that will have local
  changes like config files will always have.
- fixed CHMOD, no need for executable flag here as the server won't execute
  these files, but only load (read) them
- fixed E_NOTICE in boot.php when entrance/index page (no parameter) is being
  called

Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-01 20:00:32 +01:00

58 lines
1.4 KiB
Smarty

<h1>Crop Image</h1>
<p id="cropimage-desc">
Please adjust the image cropping for optimum viewing.
</p>
<div id="cropimage-wrapper">
<img src="$image_url" id="croppa" class="imgCrop" alt="" />
</div>
<div id="cropimage-preview-wrapper" >
<div id="previewWrap" ></div>
</div>
<script type="text/javascript" language="javascript">
function onEndCrop( coords, dimensions ) {
$( 'x1' ).value = coords.x1;
$( 'y1' ).value = coords.y1;
$( 'x2' ).value = coords.x2;
$( 'y2' ).value = coords.y2;
$( 'width' ).value = dimensions.width;
$( 'height' ).value = dimensions.height;
}
Event.observe( window, 'load', function() {
new Cropper.ImgWithPreview(
'croppa',
{
previewWrap: 'previewWrap',
minWidth: 175,
minHeight: 175,
maxWidth: 640,
maxHeight: 640,
ratioDim: { x: 100, y:100 },
displayOnInit: true,
onEndCrop: onEndCrop
}
);
}
);
</script>
<form action="profile_photo/$resource" id="crop-image-form" method="post" />
<input type="hidden" name="imagename" value="$hash" />
<input type="hidden" name="cropfinal" value="1" />
<input type="hidden" name="xstart" id="x1" />
<input type="hidden" name="ystart" id="y1" />
<input type="hidden" name="xfinal" id="x2" />
<input type="hidden" name="yfinal" id="y2" />
<input type="hidden" name="height" id="height" />
<input type="hidden" name="width" id="width" />
<div id="crop-image-submit-wrapper" >
<input type="submit" name="submit" value="Done Editing" />
</div>
</form>