2016-01-14 01:32:09 +00:00
|
|
|
<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" >
|
2018-01-24 00:36:56 +00:00
|
|
|
<div id="previewWrap" class="crop-preview" style="width: 320px; height: 116px; max-width: 320px; max-height: 116px; overflow: hidden"></div>
|
2016-01-14 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
2018-01-24 00:36:56 +00:00
|
|
|
var image = document.getElementById('croppa');
|
|
|
|
var cropper = new Cropper(image, {
|
|
|
|
aspectRatio: 2.75 / 1,
|
|
|
|
viewMode: 1,
|
|
|
|
preview: '.crop-preview',
|
|
|
|
crop: function(e) {
|
|
|
|
$( 'x1' ).value = e.detail.x;
|
|
|
|
$( 'y1' ).value = e.detail.y;
|
|
|
|
$( 'x2' ).value = e.detail.x + e.detail.width;
|
|
|
|
$( 'y2' ).value = e.detail.y + e.detail.height;
|
|
|
|
$( 'width' ).value = e.detail.scaleX;
|
|
|
|
$( 'height' ).value = e.detail.scaleY;
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2016-01-14 01:32:09 +00:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<form action="cover_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>
|