diff options
author | Zach Prezkuta <fermion@gmx.com> | 2013-01-06 14:42:51 -0700 |
---|---|---|
committer | Zach Prezkuta <fermion@gmx.com> | 2013-01-06 15:57:11 -0700 |
commit | a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468 (patch) | |
tree | 280d792355cb2e60cf62e8451b6d8afbbfcc7c0d /view/tpl/smarty3/cropbody.tpl | |
parent | 61b8ea9e1af74e2056e18b02c170a899de9abd1b (diff) | |
download | volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.tar.gz volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.tar.bz2 volse-hubzilla-a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468.zip |
implement Smarty3
Diffstat (limited to 'view/tpl/smarty3/cropbody.tpl')
-rw-r--r-- | view/tpl/smarty3/cropbody.tpl | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/view/tpl/smarty3/cropbody.tpl b/view/tpl/smarty3/cropbody.tpl new file mode 100644 index 000000000..da5b1e859 --- /dev/null +++ b/view/tpl/smarty3/cropbody.tpl @@ -0,0 +1,58 @@ +<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='form_security_token' value='{{$form_security_token}}'> + +<input type='hidden' name='profile' value='{{$profile}}'> +<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> |