diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-03-30 16:05:43 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-03-30 16:05:43 +0200 |
commit | 9acccb2b90ff5276c0cc84b3b006c7a393c53786 (patch) | |
tree | 073576560eaa6e00266c3e85a5e76df6e1dca032 /view/cropbody.tpl | |
parent | 05d9035aaa55c3b38fcb15d799644e3c5eda5f11 (diff) | |
parent | 18da7efa27fcff8fb2b3b679938954e712427de9 (diff) | |
download | volse-hubzilla-9acccb2b90ff5276c0cc84b3b006c7a393c53786.tar.gz volse-hubzilla-9acccb2b90ff5276c0cc84b3b006c7a393c53786.tar.bz2 volse-hubzilla-9acccb2b90ff5276c0cc84b3b006c7a393c53786.zip |
Merge remote-tracking branch 'friendika-master/master'
Diffstat (limited to 'view/cropbody.tpl')
-rw-r--r-- | view/cropbody.tpl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/view/cropbody.tpl b/view/cropbody.tpl new file mode 100644 index 000000000..c9c0f84de --- /dev/null +++ b/view/cropbody.tpl @@ -0,0 +1,56 @@ +<h1>$title</h1> +<p id="cropimage-desc"> +$desc +</p> +<div id="cropimage-wrapper"> +<img src="$image_url" id="croppa" class="imgCrop" alt="$title" /> +</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="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" /> +</div> + +</form> |