remove umb-photo-folder
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name umbraco.directives.directive:umbPhotoFolder
|
||||
* @deprecated
|
||||
* We plan to remove this directive in the next major version of umbraco (8.0). The directive is not recommended to use.
|
||||
* @restrict E
|
||||
**/
|
||||
|
||||
angular.module("umbraco.directives.html")
|
||||
.directive('umbPhotoFolder', function($compile, $log, $timeout, $filter, umbPhotoFolderHelper) {
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
require: '?ngModel',
|
||||
terminate: true,
|
||||
templateUrl: 'views/directives/_obsolete/umb-photo-folder.html',
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
|
||||
var lastWatch = null;
|
||||
|
||||
ngModel.$render = function() {
|
||||
if (ngModel.$modelValue) {
|
||||
|
||||
$timeout(function() {
|
||||
var photos = ngModel.$modelValue;
|
||||
|
||||
scope.clickHandler = scope.$eval(element.attr('on-click'));
|
||||
|
||||
|
||||
var imagesOnly = element.attr('images-only') === "true";
|
||||
|
||||
|
||||
var margin = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
|
||||
var startingIndex = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
|
||||
var minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;
|
||||
var minHeight = element.attr('min-height') ? parseInt(element.attr('min-height'), 10) : 100;
|
||||
var maxHeight = element.attr('max-height') ? parseInt(element.attr('max-height'), 10) : 300;
|
||||
var idealImgPerRow = element.attr('ideal-items-per-row') ? parseInt(element.attr('ideal-items-per-row'), 10) : 5;
|
||||
var fixedRowWidth = Math.max(element.width(), minWidth);
|
||||
|
||||
scope.containerStyle = { width: fixedRowWidth + "px" };
|
||||
scope.rows = umbPhotoFolderHelper.buildGrid(photos, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
|
||||
|
||||
if (attrs.filterBy) {
|
||||
|
||||
//we track the watches that we create, we don't want to create multiple, so clear it
|
||||
// if it already exists before creating another.
|
||||
if (lastWatch) {
|
||||
lastWatch();
|
||||
}
|
||||
|
||||
//TODO: Need to debounce this so it doesn't filter too often!
|
||||
lastWatch = scope.$watch(attrs.filterBy, function (newVal, oldVal) {
|
||||
if (newVal && newVal !== oldVal) {
|
||||
var p = $filter('filter')(photos, newVal, false);
|
||||
scope.baseline = 0;
|
||||
var m = umbPhotoFolderHelper.buildGrid(p, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin, imagesOnly);
|
||||
scope.rows = m;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}, 500); //end timeout
|
||||
} //end if modelValue
|
||||
|
||||
}; //end $render
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -668,123 +668,6 @@ ul.color-picker li {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Photo folder styling
|
||||
// --------------------------------------------------
|
||||
|
||||
.umb-photo-folder .picrow{
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.umb-photo-folder .picrow div, .umb-photo-preview{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: none;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.umb-photo-folder .picrow div a:first-child {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.umb-photo-folder .picrow div.umb-photo {
|
||||
width:100%;
|
||||
height:100%;
|
||||
background-color: @gray-10;
|
||||
}
|
||||
|
||||
.umb-photo-folder a:hover{text-decoration: none}
|
||||
.umb-photo-folder .umb-non-thumbnail{
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 12px;
|
||||
background: @gray-10;
|
||||
color: @black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.umb-photo-folder .selector-overlay{
|
||||
display: none;
|
||||
}
|
||||
|
||||
//this is a temp hack, to provide selectors in the dialog:
|
||||
.umb-photo-folder .pic:hover .selector-overlay {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
padding: 5px;
|
||||
background: @black;
|
||||
z-index: 100;
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: @white;
|
||||
opacity: 0.4;
|
||||
text-decoration:none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.umb-photo-folder .umb-non-thumbnail i{
|
||||
color: @gray-8;
|
||||
font-size: 50px;
|
||||
line-height: 60px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
/*vertically aligns */
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.umb-photo-folder .umb-non-thumbnail span{
|
||||
position: absolute;
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.umb-photo-folder .selected{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.umb-photo-folder .selected:before{
|
||||
content: "\e165";
|
||||
font-family: Icomoon;
|
||||
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
|
||||
font-size: 24px;
|
||||
color: @black;
|
||||
opacity: 0.5;
|
||||
background: @white;
|
||||
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
-moz-border-radius: 15px;
|
||||
border-radius: 15px;
|
||||
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// File upload
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<div class="umb-photo-folder" ng-style="containerStyle">
|
||||
<div class="picrow" ng-repeat="row in rows">
|
||||
|
||||
<div class="pic"
|
||||
ng-class="img.cssclass"
|
||||
ng-style="img.style" ng-repeat="img in row.images">
|
||||
|
||||
<a href="#media/media/edit/{{img.id}}"
|
||||
ng-click="clickHandler(img, $event, false)"
|
||||
title="{{img.name}}">
|
||||
|
||||
<div ng-style="img.style" class="umb-non-thumbnail" ng-if="!img.thumbnail">
|
||||
<i class="icon large {{img.icon}}"></i>
|
||||
<span>{{img.name}}</span>
|
||||
</div>
|
||||
|
||||
<div ng-if="img.thumbnail" class="umb-photo" ng-style="img.thumbStyle" alt="{{img.name}}">
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href ng-click="clickHandler(img, $event, true)" class="selector-overlay">
|
||||
<localize key="buttons_select" ng-if="img.isFolder">Select</localize>
|
||||
<span ng-if="!img.isFolder">{{img.name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user