Merge remote-tracking branch 'origin/v8/8.8' into v8/8.9
# Conflicts: # src/SolutionInfo.cs # src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
This commit is contained in:
@@ -31,7 +31,7 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
{ oldIcon: ".sprToPublish", newIcon: "mail-forward" },
|
||||
{ oldIcon: ".sprTranslate", newIcon: "comments" },
|
||||
{ oldIcon: ".sprUpdate", newIcon: "save" },
|
||||
|
||||
|
||||
{ oldIcon: ".sprTreeSettingDomain", newIcon: "icon-home" },
|
||||
{ oldIcon: ".sprTreeDoc", newIcon: "icon-document" },
|
||||
{ oldIcon: ".sprTreeDoc2", newIcon: "icon-diploma-alt" },
|
||||
@@ -39,21 +39,21 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
{ oldIcon: ".sprTreeDoc4", newIcon: "icon-newspaper-alt" },
|
||||
{ oldIcon: ".sprTreeDoc5", newIcon: "icon-notepad-alt" },
|
||||
|
||||
{ oldIcon: ".sprTreeDocPic", newIcon: "icon-picture" },
|
||||
{ oldIcon: ".sprTreeDocPic", newIcon: "icon-picture" },
|
||||
{ oldIcon: ".sprTreeFolder", newIcon: "icon-folder" },
|
||||
{ oldIcon: ".sprTreeFolder_o", newIcon: "icon-folder" },
|
||||
{ oldIcon: ".sprTreeMediaFile", newIcon: "icon-music" },
|
||||
{ oldIcon: ".sprTreeMediaMovie", newIcon: "icon-movie" },
|
||||
{ oldIcon: ".sprTreeMediaPhoto", newIcon: "icon-picture" },
|
||||
|
||||
|
||||
{ oldIcon: ".sprTreeMember", newIcon: "icon-user" },
|
||||
{ oldIcon: ".sprTreeMemberGroup", newIcon: "icon-users" },
|
||||
{ oldIcon: ".sprTreeMemberType", newIcon: "icon-users" },
|
||||
|
||||
|
||||
{ oldIcon: ".sprTreeNewsletter", newIcon: "icon-file-text-alt" },
|
||||
{ oldIcon: ".sprTreePackage", newIcon: "icon-box" },
|
||||
{ oldIcon: ".sprTreeRepository", newIcon: "icon-server-alt" },
|
||||
|
||||
|
||||
{ oldIcon: ".sprTreeSettingDataType", newIcon: "icon-autofill" },
|
||||
|
||||
// TODO: Something needs to be done with the old tree icons that are commented out.
|
||||
@@ -61,7 +61,7 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
{ oldIcon: ".sprTreeSettingAgent", newIcon: "" },
|
||||
{ oldIcon: ".sprTreeSettingCss", newIcon: "" },
|
||||
{ oldIcon: ".sprTreeSettingCssItem", newIcon: "" },
|
||||
|
||||
|
||||
{ oldIcon: ".sprTreeSettingDataTypeChild", newIcon: "" },
|
||||
{ oldIcon: ".sprTreeSettingDomain", newIcon: "" },
|
||||
{ oldIcon: ".sprTreeSettingLanguage", newIcon: "" },
|
||||
@@ -94,9 +94,9 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
var iconCache = [];
|
||||
var liveRequests = [];
|
||||
var allIconsRequested = false;
|
||||
|
||||
|
||||
return {
|
||||
|
||||
|
||||
/** Used by the create dialogs for content/media types to format the data so that the thumbnails are styled properly */
|
||||
formatContentTypeThumbnails: function (contentTypes) {
|
||||
for (var i = 0; i < contentTypes.length; i++) {
|
||||
@@ -209,15 +209,11 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
,'Failed to retrieve icon: ' + iconName)
|
||||
.then(icon => {
|
||||
if(icon) {
|
||||
var trustedIcon = {
|
||||
name: icon.Name,
|
||||
svgString: $sce.trustAsHtml(icon.SvgString)
|
||||
};
|
||||
this._cacheIcon(trustedIcon);
|
||||
var trustedIcon = this.defineIcon(icon.Name, icon.SvgString);
|
||||
|
||||
liveRequests = _.filter(liveRequests, iconRequestPath);
|
||||
liveRequests = _.filter(liveRequests, iconRequestPath);
|
||||
|
||||
resolve(trustedIcon);
|
||||
resolve(trustedIcon);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -240,15 +236,10 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
,'Failed to retrieve icons')
|
||||
.then(icons => {
|
||||
icons.forEach(icon => {
|
||||
var trustedIcon = {
|
||||
name: icon.Name,
|
||||
svgString: $sce.trustAsHtml(icon.SvgString)
|
||||
};
|
||||
|
||||
this._cacheIcon(trustedIcon);
|
||||
this.defineIcon(icon.Name, icon.SvgString);
|
||||
});
|
||||
|
||||
resolve(iconCache);
|
||||
resolve(iconCache);
|
||||
})
|
||||
.catch(err => {
|
||||
console.warn(err);
|
||||
@@ -278,7 +269,7 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
console.warn("Can't read the css rules of: " + document.styleSheets[i].href, e);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (classes !== null) {
|
||||
for(var x=0;x<classes.length;x++) {
|
||||
var cur = classes[x];
|
||||
@@ -312,11 +303,17 @@ function iconHelper($http, $q, $sce, $timeout, umbRequestHelper) {
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
/** A simple cache to ensure that the icon is only requested from the server if is isn't already in memory */
|
||||
_cacheIcon: function(icon) {
|
||||
if(_.find(iconCache, {name: icon.name}) === undefined) {
|
||||
iconCache = _.union(iconCache, [icon]);
|
||||
}
|
||||
/** Creates a icon object, and caches it in a runtime cache */
|
||||
defineIcon: function(name, svg) {
|
||||
var icon = iconCache.find(x => x.name === name);
|
||||
if(icon === undefined) {
|
||||
icon = {
|
||||
name: name,
|
||||
svgString: $sce.trustAsHtml(svg)
|
||||
};
|
||||
iconCache.push(icon);
|
||||
}
|
||||
return icon;
|
||||
},
|
||||
|
||||
/** Returns the cached icon or undefined */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
vm.submit = submit;
|
||||
vm.close = close;
|
||||
vm.cropSet = cropSet;
|
||||
|
||||
if (!$scope.model.target.coordinates && !$scope.model.target.focalPoint) {
|
||||
$scope.model.target.focalPoint = { left: .5, top: .5 };
|
||||
@@ -56,4 +57,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
function cropSet() {
|
||||
var model = $scope.model;
|
||||
return (model.cropSize || {}).width && model.target.thumbnail;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<div class="umb-control-group" ng-if="model.target">
|
||||
|
||||
<div ng-if="model.disableFocalPoint && model.target.thumbnail">
|
||||
<div ng-if="vm.cropSet() === false">
|
||||
<h5>
|
||||
<localize key="general_preview">Preview</localize>
|
||||
</h5>
|
||||
@@ -34,7 +34,7 @@
|
||||
<img ng-src="{{model.target.thumbnail}}" alt="{{model.target.name}}" />
|
||||
</div>
|
||||
|
||||
<div ng-if="!model.disableFocalPoint">
|
||||
<div ng-if="vm.cropSet()">
|
||||
<h5>
|
||||
<localize key="@general_cropSection">Crop section</localize>
|
||||
</h5>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<!-- Renders when it's only possible to create one specific document type for which a blueprint exits-->
|
||||
<div class="btn-group" ng-show="createAllowedButtonSingleWithBlueprints" deep-blur="leaveDropdown()">
|
||||
<button type="button" class="btn btn-white dropdown-toggle" aria-expanded="{{page.createDropdownOpen}}" ng-click="toggleDropdown()">
|
||||
<button type="button" class="btn btn-outline umb-outline dropdown-toggle" aria-expanded="{{page.createDropdownOpen}}" ng-click="toggleDropdown()">
|
||||
<span>
|
||||
<localize key="actions_create">Create</localize> {{listViewAllowedTypes[0].name}}
|
||||
</span>
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<!-- Renders when it's possible to create multiple document types and blueprints for one or more of the document types-->
|
||||
<div class="btn-group" ng-show="createAllowedButtonMultiWithBlueprints" deep-blur="leaveDropdown()">
|
||||
<button type="button" class="btn btn-white dropdown-toggle" aria-expanded="{{page.createDropdownOpen === undefined ? false : page.createDropdownOpen}}" ng-click="toggleDropdown()">
|
||||
<button type="button" class="btn btn-outline umb-outline dropdown-toggle" aria-expanded="{{page.createDropdownOpen === undefined ? false : page.createDropdownOpen}}" ng-click="toggleDropdown()">
|
||||
<localize key="actions_create">Create</localize>
|
||||
<span class="caret" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user