aboutsummaryrefslogtreecommitdiffstats
path: root/view/fr/cropbody.tpl
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-24 07:33:56 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-24 07:33:56 +0100
commit4198efe03570606b35f3aba6cdf7f80de20384f4 (patch)
tree5a59cf3b29a70f22728e25d7c46ab8648bcda407 /view/fr/cropbody.tpl
parent2319bc43bf3f837c22daa5067dcf538e8b5a792d (diff)
parent205a2b8930c9d519c06f106d5d37702f8f69d013 (diff)
downloadvolse-hubzilla-4198efe03570606b35f3aba6cdf7f80de20384f4.tar.gz
volse-hubzilla-4198efe03570606b35f3aba6cdf7f80de20384f4.tar.bz2
volse-hubzilla-4198efe03570606b35f3aba6cdf7f80de20384f4.zip
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'view/fr/cropbody.tpl')
-rw-r--r--view/fr/cropbody.tpl57
1 files changed, 57 insertions, 0 deletions
diff --git a/view/fr/cropbody.tpl b/view/fr/cropbody.tpl
new file mode 100644
index 000000000..39395af8e
--- /dev/null
+++ b/view/fr/cropbody.tpl
@@ -0,0 +1,57 @@
+<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>