friendica/view/cropbody.tpl

59 lines
1.5 KiB
Smarty
Raw Normal View History

2011-03-30 02:19:12 +02:00
<h1>$title</h1>
2010-07-02 01:48:07 +02:00
<p id="cropimage-desc">
2011-03-30 02:19:12 +02:00
$desc
2010-07-02 01:48:07 +02:00
</p>
<div id="cropimage-wrapper">
2011-03-30 02:19:12 +02:00
<img src="$image_url" id="croppa" class="imgCrop" alt="$title" />
2010-07-02 01:48:07 +02:00
</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" />
2012-03-12 21:17:37 +01:00
<input type='hidden' name='form_security_token' value='$form_security_token'>
2010-07-02 01:48:07 +02:00
2012-09-12 03:51:17 +02:00
<input type='hidden' name='profile' value='$profile'>
<input type="hidden" name="cropfinal" value="1" />
2010-07-02 01:48:07 +02:00
<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" >
2011-03-30 02:19:12 +02:00
<input type="submit" name="submit" value="$done" />
2010-07-02 01:48:07 +02:00
</div>
</form>