|
|
@@ -26,16 +26,27 @@ $(document).ready(function(){
|
|
|
$(this).next().show();
|
|
|
});
|
|
|
|
|
|
- $('.jp-grids-photos').imgAreaSelect({ maxWidth: 200, maxHeight: 170, handles: true });
|
|
|
-
|
|
|
- $('.jp-grids-photos').imgAreaSelect({
|
|
|
- onSelectEnd: function (img, selection) {
|
|
|
- $('input[name="x1"]').val(selection.x1);
|
|
|
- $('input[name="y1"]').val(selection.y1);
|
|
|
- $('input[name="x2"]').val(selection.x2);
|
|
|
- $('input[name="y2"]').val(selection.y2);
|
|
|
- }
|
|
|
- });
|
|
|
+ <#if imageSize?? && imageSize=="bigImage">
|
|
|
+ $('.jp-grids-photos').imgAreaSelect({aspectRatio: '470:300', maxWidth: 94, maxHeight: 60, handles: true });
|
|
|
+ $('.jp-grids-photos').imgAreaSelect({
|
|
|
+ onSelectEnd: function (img, selection) {
|
|
|
+ $('input[name="x1"]').val(selection.x1);
|
|
|
+ $('input[name="y1"]').val(selection.y1);
|
|
|
+ $('input[name="x2"]').val(selection.x2);
|
|
|
+ $('input[name="y2"]').val(selection.y2);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ <#elseif imageSize?? && imageSize=="smallImage">
|
|
|
+ $('.jp-grids-photos').imgAreaSelect({aspectRatio: '1:1', maxWidth: 50, maxHeight: 50, handles: true });
|
|
|
+ $('.jp-grids-photos').imgAreaSelect({
|
|
|
+ onSelectEnd: function (img, selection) {
|
|
|
+ $('input[name="x1"]').val(selection.x1);
|
|
|
+ $('input[name="y1"]').val(selection.y1);
|
|
|
+ $('input[name="x2"]').val(selection.x2);
|
|
|
+ $('input[name="y2"]').val(selection.y2);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ </#if>
|
|
|
});
|
|
|
|
|
|
$('#fine-uploader-gallery').fineUploader({
|
|
|
@@ -134,7 +145,9 @@ function doUpload(sourceId) {
|
|
|
<div class="brower-active-icon" style="display: none">
|
|
|
<i class="fa fa-check-square-o fa-2x" aria-hidden="true"></i>
|
|
|
</div>
|
|
|
- <button onclick="doUpload(${bean.id})">确定</button>
|
|
|
+ <#if imageSize?? && imageSize != "undefined">
|
|
|
+ <button onclick="doUpload(${bean.id})">确定</button>
|
|
|
+ </#if>
|
|
|
</li>
|
|
|
</#list>
|
|
|
</#if>
|