aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/cropbody.tpl
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-02 12:46:50 -0700
committerzotlabs <mike@macgirvin.com>2017-05-02 12:46:50 -0700
commit80ec92ce8d9f615eeb06d92b67ad1ff840cad0cc (patch)
tree484f2101b78ae16f397310470b7e30f2c03d7b57 /view/tpl/cropbody.tpl
parent83c4dd6bda1677a3441d06247ea076094394703e (diff)
downloadvolse-hubzilla-80ec92ce8d9f615eeb06d92b67ad1ff840cad0cc.tar.gz
volse-hubzilla-80ec92ce8d9f615eeb06d92b67ad1ff840cad0cc.tar.bz2
volse-hubzilla-80ec92ce8d9f615eeb06d92b67ad1ff840cad0cc.zip
Revert "move theme specific files to theme dir"
This reverts commit e332d1074f1b663ec66d37b0f575df2e41d5535c.
Diffstat (limited to 'view/tpl/cropbody.tpl')
-rwxr-xr-xview/tpl/cropbody.tpl58
1 files changed, 58 insertions, 0 deletions
diff --git a/view/tpl/cropbody.tpl b/view/tpl/cropbody.tpl
new file mode 100755
index 000000000..01d9a24a0
--- /dev/null
+++ b/view/tpl/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: 300,
+ minHeight: 300,
+ maxWidth: 1024,
+ maxHeight: 1024,
+ 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>