-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
216 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
return [ | ||
'choose' => 'Select Cropper', | ||
'title' => 'Image Cropper', | ||
'done' => 'Crop', | ||
'origin' => 'Origin', | ||
'clear' => 'Clear', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
return [ | ||
'choose' => '选择要剪裁的图片', | ||
'title' => '图片剪裁器', | ||
'done' => '剪裁', | ||
'origin' => '原图', | ||
'clear' => '清空', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,15 @@ | ||
<style> | ||
.cropper-img{ | ||
max-width: 300px; | ||
max-height: 300px; | ||
border: 1px solid #ddd; | ||
box-shadow: 1px 1px 5px 0 #a2958a; | ||
padding: 6px; | ||
float: left; | ||
clear: both; | ||
} | ||
.cropper-btn{ | ||
margin-bottom: 10px; | ||
} | ||
.cropper-file{ | ||
display: none !important; | ||
} | ||
#cropping-img{ | ||
max-width: 100%; | ||
} | ||
#cropping-div{ | ||
width: 98%; | ||
height: 98%; | ||
margin: 0 auto; | ||
} | ||
</style> | ||
<div class="{{$viewClass['form-group']}} {!! !$errors->has($errorKey) ? '' : 'has-error' !!}"> | ||
|
||
<label for="{{$id}}" class="{{$viewClass['label']}} control-label">{{$label}}</label> | ||
|
||
<div class="{{$viewClass['field']}}"> | ||
|
||
@include('admin::form.error') | ||
<div data-id="{{$id}}" class="btn btn-info pull-left cropper-btn">浏览</div> | ||
<input id="{{$id}}-file" {!! $attributes !!} data-id="{{$id}}" class="cropper-file" type="file" accept="image/*"/> | ||
<img id="{{$id}}-img" {!! $attributes !!} data-id="{{$id}}" class="cropper-img" {!! empty($value) ? '' : 'src="'.old($column, $value).'"' !!}> | ||
<input id="{{$id}}-input" type="hidden" name="{{$name}}" value="{{ old($column, $value) }}" {!! $attributes !!} /> | ||
|
||
<div class="btn btn-info pull-left cropper-btn">{{ trans('admin_cropper.choose') }}</div> | ||
@include('admin::form.help-block') | ||
|
||
<input class="cropper-file" type="file" accept="image/*"/> | ||
<!-- <img class="cropper-img" {!! empty($value) ? '' : 'src="'.old($column, $value).'"' !!}> --> | ||
<img class="cropper-img" {!! empty($value) ? '' : 'src="'.$preview.'"' !!}> | ||
<input class="cropper-input" name="{{$name}}" value="{{ old($column, $value) }}" {!! $attributes !!} /> | ||
|
||
</div> | ||
</div> | ||
|
Oops, something went wrong.