]> git.mxchange.org Git - friendica.git/blob - view/smarty3/cropbody.tpl
a0c24f7b272a44807eb7fd1c501cdd1bd51fcc7b
[friendica.git] / view / smarty3 / cropbody.tpl
1 {{*
2  *      AUTOMATICALLY GENERATED TEMPLATE
3  *      DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
4  *
5  *}}<h1>{{$title}}</h1>
6 <p id="cropimage-desc">
7 {{$desc}}
8 </p>
9 <div id="cropimage-wrapper">
10 <img src="{{$image_url}}" id="croppa" class="imgCrop" alt="{{$title}}" />
11 </div>
12 <div id="cropimage-preview-wrapper" >
13 <div id="previewWrap" ></div>
14 </div>
15
16 <script type="text/javascript" language="javascript">
17
18         function onEndCrop( coords, dimensions ) {
19                 $( 'x1' ).value = coords.x1;
20                 $( 'y1' ).value = coords.y1;
21                 $( 'x2' ).value = coords.x2;
22                 $( 'y2' ).value = coords.y2;
23                 $( 'width' ).value = dimensions.width;
24                 $( 'height' ).value = dimensions.height;
25         }
26
27         Event.observe( window, 'load', function() {
28                 new Cropper.ImgWithPreview(
29                 'croppa',
30                 {
31                         previewWrap: 'previewWrap',
32                         minWidth: 175,
33                         minHeight: 175,
34                         maxWidth: 640,
35                         maxHeight: 640,
36                         ratioDim: { x: 100, y:100 },
37                         displayOnInit: true,
38                         onEndCrop: onEndCrop
39                 }
40                 );
41         }
42         );
43
44 </script>
45
46 <form action="profile_photo/{{$resource}}" id="crop-image-form" method="post" />
47 <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
48
49 <input type='hidden' name='profile' value='{{$profile}}'>
50 <input type="hidden" name="cropfinal" value="1" />
51 <input type="hidden" name="xstart" id="x1" />
52 <input type="hidden" name="ystart" id="y1" />
53 <input type="hidden" name="xfinal" id="x2" />
54 <input type="hidden" name="yfinal" id="y2" />
55 <input type="hidden" name="height" id="height" />
56 <input type="hidden" name="width"  id="width" />
57
58 <div id="crop-image-submit-wrapper" >
59 <input type="submit" name="submit" value="{{$done}}" />
60 </div>
61
62 </form>