Add WebCms
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<div class="umb-editor umb-mediapicker"
|
||||
ng-controller="Umbraco.PropertyEditors.ImageCropperController">
|
||||
|
||||
|
||||
<span class="fileinput-button umb-upload-button-big"
|
||||
style="margin-bottom: 5px;"
|
||||
ng-hide="imageSrc">
|
||||
<i class="icon icon-page-up"></i>
|
||||
<p><localize key="media_clickToUpload">Click to upload</localize></p>
|
||||
<umb-single-file-upload></umb-single-file-upload>
|
||||
</span>
|
||||
|
||||
|
||||
<div ng-if="imageSrc">
|
||||
|
||||
|
||||
<div class="imagecropper clearfix">
|
||||
|
||||
<div ng-if="currentCrop" style="float:left; max-width: 100%;" class="clearfix">
|
||||
<div class="umb-cropper__container">
|
||||
|
||||
<i ng-click="done()" class="icon icon-delete btn-round umb-close-cropper"></i>
|
||||
|
||||
<div>
|
||||
<umb-image-crop height="{{currentCrop.height}}"
|
||||
width="{{currentCrop.width}}"
|
||||
crop="currentCrop.coordinates"
|
||||
center="model.value.focalPoint"
|
||||
max-size="450"
|
||||
src="imageSrc">
|
||||
</umb-image-crop>
|
||||
</div>
|
||||
|
||||
<a href style="margin:auto; text-align: center; font-size: 11px;" class="btn btn-link red"
|
||||
ng-click="currentCrop.coordinates = undefined; done()">
|
||||
<localize key="imagecropper_reset">Reset</localize>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!currentCrop" class="umb-cropper-imageholder clearfix">
|
||||
<umb-image-gravity
|
||||
src="imageSrc"
|
||||
center="model.value.focalPoint"
|
||||
on-image-loaded="imageLoaded">
|
||||
</umb-image-gravity>
|
||||
<a href class="btn btn-link btn-crop-delete" ng-click="clear()"><i class="icon-delete red"></i> <localize key="content_uploadClear">Remove file</localize></a>
|
||||
</div>
|
||||
|
||||
<ul class="umb-sortable-thumbnails cropList clearfix">
|
||||
<li ng-repeat=" (key,value) in model.value.crops" ng-class="{'current':currentCrop.alias === value.alias}" ng-click="crop(value)">
|
||||
|
||||
<umb-image-thumbnail center="model.value.focalPoint"
|
||||
crop="value.coordinates"
|
||||
src="imageSrc"
|
||||
height="{{value.height}}"
|
||||
width="{{value.width}}"
|
||||
max-size="75">
|
||||
</umb-image-thumbnail>
|
||||
|
||||
<div class="crop-information">
|
||||
<span class="crop-name crop-text">{{value.alias}}</span>
|
||||
<span class="crop-size crop-text">{{value.width}}px x {{value.height}}px</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<div ng-controller="Umbraco.PrevalueEditors.CropSizesController" class="umb-editor umb-cropsizes">
|
||||
|
||||
|
||||
<div class="control-group" ng-if="model.value.length > 0">
|
||||
<ul class="unstyled list-icons"
|
||||
ui-sortable
|
||||
ng-model="model.value">
|
||||
<li ng-repeat="node in model.value">
|
||||
<a href=""><i class="icon icon-delete red hover-show pull-right" ng-click="remove(node, $event)"></i></a>
|
||||
<i class="icon icon-picture handle hover-hide"></i>
|
||||
|
||||
<a href prevent-default ng-click="edit(node, $event)">{{node.alias}}</a>
|
||||
<br /><small>{{node.width}}px × {{node.height}}px</small>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form" ng-show="newItem">
|
||||
<h4>Define crop</h4>
|
||||
<p>
|
||||
Give the crop an alias and it's default width and height.
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<label>Alias</label>
|
||||
<input name="newItem.alias" type="text"
|
||||
ng-model="newItem.alias" val-highlight="{{hasError}}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>Size</label>
|
||||
<input name="newItem.width" type="number" placeholder="Width"
|
||||
ng-model="newItem.width" class="umb-editor-tiny" val-highlight="{{hasError}}" />
|
||||
×
|
||||
<input name="newItem.height" type="number" placeholder="Height"
|
||||
ng-model="newItem.height" class="umb-editor-tiny" val-highlight="{{hasError}}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<button class="btn" ng-click="add($event)">Save crop</button>
|
||||
<a href class="btn btn-link" ng-click="cancel($event)">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" ng-hide="newItem">
|
||||
<button class="btn" ng-click="newItem = {}" prevent-default>Add new crop</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user