Merge commit 'refs/tags/release-8.8.0^{}' into v8/8.9

# Conflicts:
#	src/SolutionInfo.cs
This commit is contained in:
Claus
2020-10-01 08:34:59 +02:00
14 changed files with 717 additions and 695 deletions

View File

@@ -252,7 +252,7 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
/** LEGACY - Return a list of icons from icon fonts, optionally filter them */
/** It fetches them directly from the active stylesheets in the browser */
getLegacyIcons: function(){
getIcons: function(){
var deferred = $q.defer();
$timeout(function(){
if(collectedIcons){
@@ -284,13 +284,8 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
s = s.substring(0, hasPseudo);
}
var icon = {
name: s,
svgString: undefined
};
if(collectedIcons.indexOf(icon) < 0 && s !== "icon-chevron-up" && s !== "icon-chevron-down"){
collectedIcons.push(icon);
if(collectedIcons.indexOf(s) < 0){
collectedIcons.push(s);
}
}
}

View File

@@ -4,10 +4,10 @@
margin: 0 auto;
cursor: pointer;
border-radius: @baseBorderRadius;
color: black;
color: @ui-action-discreet-type;
position: relative;
opacity: 0.8;
transition: opacity .3s ease-out;
transition: opacity 120ms, color 120ms;
&--absolute {
position: absolute;
@@ -23,6 +23,10 @@
justify-content: center;
}
&:hover {
color: @ui-action-discreet-type-hover;
}
.umb-button-ellipsis--tab,
.umb-tour-is-visible .umb-tree &,
&:hover,
@@ -47,6 +51,7 @@
&__icon {
color: inherit;
flex-basis: 100%;
font-size: 12px;
.umb-button-ellipsis--tab & {
margin: 0 0 7px;

View File

@@ -1,5 +1,7 @@
.umb-tree-root {
.umb-tree-root {
border: 2px solid transparent;
&-link {
display: flex;
align-items: center;

View File

@@ -95,7 +95,6 @@ body.touch .umb-tree {
position: relative;
width: auto;
height: auto;
margin: 0 5px 0 auto;
overflow: visible;
clip: auto;
}
@@ -185,9 +184,10 @@ body.touch .umb-tree {
flex: 0 0 auto;
justify-content: flex-end;
text-align: center;
margin: 0 5px 0 auto;
margin: 0 10px 0 auto;
cursor: pointer;
border-radius: @baseBorderRadius;
transition: background-color 120ms;
.umb-button-ellipsis {
padding: 3px 5px;
@@ -207,7 +207,7 @@ body.touch .umb-tree {
}
&:hover {
background: rgba(255, 255, 255, .5);
background-color: rgba(255, 255, 255, .8);
i {
background: @ui-active-type-hover;

View File

@@ -1,4 +1,27 @@
.umb-icon {
display: inline-block;
width: 1em;
height: 1em;
svg {
width: 100%;
height: 100%;
fill: currentColor;
}
&.large{
width: 32px;
height: 32px;
}
&.medium{
width: 24px;
height: 24px;
}
&.small{
width: 14px;
height: 14px;
}
&:before, &:after {
content: none !important;
}

View File

@@ -58,7 +58,6 @@
}
.umb-iconpicker-item i {
font-family: inherit;
font-size: 30px;
}

View File

@@ -234,3 +234,7 @@
.umb-media-grid__list-view .umb-table-cell.umb-table__name .item-name {
white-space:normal;
}
.umb-media-grid__list-view .umb-table-cell.umb-table__name ins {
text-decoration: none;
margin-top: 3px;
}

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
* @description
* The controller for the content type editor icon picker
*/
function IconPickerController($scope, $http, $sce, localizationService, iconHelper) {
function IconPickerController($scope, localizationService, iconHelper) {
var vm = this;
@@ -42,19 +42,11 @@ function IconPickerController($scope, $http, $sce, localizationService, iconHelp
vm.loading = true;
setTitle();
iconHelper.getAllIcons()
.then(icons => {
vm.icons = icons;
vm.loading = false;
iconHelper.getLegacyIcons()
.then(icons => {
if(icons && icons.length > 0) {
vm.icons = icons.concat(vm.icons);
}
});
});
iconHelper.getIcons().then(function (icons) {
vm.icons = icons;
vm.loading = false;
});
// set a default color if nothing is passed in
vm.color = $scope.model.color ? findColor($scope.model.color) : vm.colors.find(x => x.default);
@@ -96,7 +88,7 @@ function IconPickerController($scope, $http, $sce, localizationService, iconHelp
}
function submit() {
if ($scope.model && $scope.model.submit) {
if ($scope.model && $scope.model.submit) {
$scope.model.submit($scope.model);
}
}

View File

@@ -45,10 +45,10 @@
<div class="umb-control-group" ng-show="!vm.loading && filtered.length > 0 ">
<ul class="umb-iconpicker" ng-class="vm.color.value" ng-show="vm.icons">
<li class="umb-iconpicker-item" ng-class="{'-selected': icon.name == model.icon}" ng-repeat="icon in filtered = (vm.icons | filter: searchTerm | orderBy:'name') track by $id(icon)">
<button type="button" title="{{icon.name}}" ng-click="vm.selectIcon(icon.name, vm.color.value)">
<umb-icon class="umb-iconpicker-svg {{icon.name}} large" icon="{{icon.name}}" svg-string="icon.svgString"></umb-icon>
<span class="sr-only"><localize key="buttons_select">Select</localize> {{icon.name}}</span>
<li class="umb-iconpicker-item" ng-class="{'-selected': icon == model.icon}" ng-repeat="icon in filtered = (vm.icons | filter: searchTerm) track by $id(icon)">
<button type="button" title="{{icon}}" ng-click="vm.selectIcon(icon, vm.color.value)">
<i class="{{icon}} large" aria-hidden="true"></i>
<span class="sr-only"><localize key="buttons_select">Select</localize> {{icon}}</span>
</button>
</li>
</ul>

View File

@@ -17,6 +17,7 @@ angular.module("umbraco")
vm.changeSearch = changeSearch;
vm.submitFolder = submitFolder;
vm.enterSubmitFolder = enterSubmitFolder;
vm.focalPointChanged = focalPointChanged;
vm.changePagination = changePagination;
vm.clickHandler = clickHandler;
@@ -241,7 +242,7 @@ angular.module("umbraco")
return getChildren(folder.id);
}
function toggleListView() {
vm.showMediaList = !vm.showMediaList;
}
@@ -370,7 +371,7 @@ angular.module("umbraco")
}
function openDetailsDialog() {
const dialog = {
view: "views/common/infiniteeditors/mediapicker/overlays/mediacropdetails.html",
size: "small",
@@ -378,7 +379,7 @@ angular.module("umbraco")
target: $scope.target,
disableFocalPoint: $scope.disableFocalPoint,
submit: function (model) {
$scope.model.selection.push($scope.target);
$scope.model.submit($scope.model);
@@ -546,6 +547,19 @@ angular.module("umbraco")
}
}
/**
* Called when the umbImageGravity component updates the focal point value
* @param {any} left
* @param {any} top
*/
function focalPointChanged(left, top) {
// update the model focalpoint value
$scope.target.focalPoint = {
left: left,
top: top
};
}
function submit() {
if ($scope.model && $scope.model.submit) {
$scope.model.submit($scope.model);

View File

@@ -6,7 +6,15 @@
vm.submit = submit;
vm.close = close;
vm.cropSet = cropSet;
vm.hasCrops = cropSet() === true;
vm.disableFocalPoint = false;
if(typeof $scope.model.disableFocalPoint === "boolean") {
vm.disableFocalPoint = $scope.model.disableFocalPoint
}
else {
vm.disableFocalPoint = ($scope.model.disableFocalPoint !== undefined && $scope.model.disableFocalPoint !== "0") ? true : false;
}
if (!$scope.model.target.coordinates && !$scope.model.target.focalPoint) {
$scope.model.target.focalPoint = { left: .5, top: .5 };
@@ -59,6 +67,6 @@
function cropSet() {
var model = $scope.model;
return (model.cropSize || {}).width && model.target.thumbnail;
return (model.cropSize || {}).width !== undefined && (model.cropSize || {}).height !== undefined;
}
});

View File

@@ -25,8 +25,7 @@
</div>
<div class="umb-control-group" ng-if="model.target">
<div ng-if="vm.cropSet() === false">
<div ng-if="vm.hasCrops === false && vm.disableFocalPoint">
<h5>
<localize key="general_preview">Preview</localize>
</h5>
@@ -34,7 +33,20 @@
<img ng-src="{{model.target.thumbnail}}" alt="{{model.target.name}}" />
</div>
<div ng-if="vm.cropSet()">
<div ng-if="vm.hasCrops === false && vm.disableFocalPoint == false">
<h5>
<localize key="@general_focalPoint">Focal point</localize>
</h5>
<div ng-if="model.target.image">
<umb-image-gravity src="model.target.image"
center="model.target.focalPoint"
on-value-changed="vm.focalPointChanged(left, top)">
</umb-image-gravity>
</div>
</div>
<div ng-if="vm.hasCrops">
<h5>
<localize key="@general_cropSection">Crop section</localize>
</h5>

View File

@@ -69,9 +69,9 @@
prevent-default>
Last Updated
<i class="umb-table-head__icon icon" aria-hidden="true" ng-class="{'icon-navigation-up': isSortDirection('updateDate', 'asc'), 'icon-navigation-down': isSortDirection('updateDate', 'desc')}"></i>
</button>
</button>
</div>
</div>
</div>
<div class="umb-table-body">
@@ -79,15 +79,15 @@
<div class="umb-table-cell">
<i ng-show="item.selected" class="umb-table-body__icon umb-table-body__checkicon icon-check" aria-hidden="true"></i>
<i class="{{item.icon}}" aria-hidden="true" ng-if="!item.thumbnail && item.extension != 'svg' && !item.selected"></i><i class="icon-picture" aria-hidden="true" ng-if="item.thumbnail && !item.selected"></i>
<i class="{{item.icon}}" class="umb-table-body__icon" aria-hidden="true" ng-if="!item.thumbnail && item.extension != 'svg' && !item.selected"></i><i class="icon-picture" aria-hidden="true" ng-if="item.thumbnail && !item.selected"></i>
</div>
<div class="umb-table-cell umb-table__name">
<ins ng-show="item.isFolder" ng-class="{'-locked': item.selected || !item.file || !item.thumbnail}" ng-click="clickItemName(item, $event, $index)" class="icon-navigation-right"></ins> <span data-src="{{item.value.src}}" class="item-name">{{item.name}}</span>
</div>
<div class="umb-table-cell">
<span class="muted small" style="font-size:0.8em">{{item.updateDate | date:'medium'}}</span>
</div>
</div>
</div>
</div>
</div>