Merge remote-tracking branch 'origin/v8/8.7' into netcore/netcore
This commit is contained in:
@@ -174,7 +174,7 @@ function clipboardService(notificationsService, eventsService, localStorageServi
|
||||
}
|
||||
);
|
||||
|
||||
var entry = {unique:uniqueKey, type:type, alias:alias, data:prepareEntryForStorage(data, firstLevelClearupMethod), label:displayLabel, icon:displayIcon};
|
||||
var entry = {unique:uniqueKey, type:type, alias:alias, data:prepareEntryForStorage(data, firstLevelClearupMethod), label:displayLabel, icon:displayIcon, date:Date.now()};
|
||||
storage.entries.push(entry);
|
||||
|
||||
if (saveStorage(storage) === true) {
|
||||
@@ -216,8 +216,7 @@ function clipboardService(notificationsService, eventsService, localStorageServi
|
||||
}
|
||||
);
|
||||
|
||||
var entry = {unique:uniqueKey, type:type, aliases:aliases, data:copiedDatas, label:displayLabel, icon:displayIcon};
|
||||
|
||||
var entry = {unique:uniqueKey, type:type, aliases:aliases, data:copiedDatas, label:displayLabel, icon:displayIcon, date:Date.now()};
|
||||
storage.entries.push(entry);
|
||||
|
||||
if (saveStorage(storage) === true) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* Grid Setup */
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
grid-auto-rows: minmax(200px, auto);
|
||||
grid-auto-rows: minmax(160px, auto);
|
||||
grid-gap: 20px;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<div class="__showcase" ng-style="{'background-color':vm.blockConfigModel.backgroundColor, 'background-image': vm.blockConfigModel.thumbnail ? 'url('+vm.blockConfigModel.thumbnail+'?upscale=false&width=400)' : 'transparent'}">
|
||||
<i ng-if="vm.blockConfigModel.thumbnail == null && vm.elementTypeModel.icon" class="__icon {{ vm.elementTypeModel.icon }}" ng-style="{'color':vm.blockConfigModel.iconColor}" aria-hidden="true"></i>
|
||||
<div class="__showcase" ng-style="{'background-color':vm.blockConfigModel.backgroundColor, 'background-image': vm.styleBackgroundImage}">
|
||||
<i ng-if="vm.blockConfigModel.thumbnail == null && vm.elementTypeModel.icon" class="__icon {{ vm.elementTypeModel.icon }}" ng-attr-style="{{'color:'+vm.blockConfigModel.iconColor+' !important'}}" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="__info">
|
||||
<div class="__name" ng-bind="vm.elementTypeModel.name"></div>
|
||||
|
||||
@@ -75,14 +75,14 @@ umb-block-card {
|
||||
.__info {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding-bottom: 6px;
|
||||
padding-bottom: 11px;// 10 + 1 to compentiate for the -1 substraction in margin-bottom.
|
||||
|
||||
.__name {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: @ui-action-type;
|
||||
margin-left: 16px;
|
||||
margin-top: 8px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.__subname {
|
||||
|
||||
@@ -14,9 +14,38 @@
|
||||
}
|
||||
});
|
||||
|
||||
function BlockCardController() {
|
||||
function BlockCardController($scope, umbRequestHelper) {
|
||||
|
||||
var vm = this;
|
||||
vm.styleBackgroundImage = "none";
|
||||
|
||||
var unwatch = $scope.$watch("vm.blockConfigModel.thumbnail", (newValue, oldValue) => {
|
||||
if(newValue !== oldValue) {
|
||||
vm.updateThumbnail();
|
||||
}
|
||||
});
|
||||
|
||||
vm.$onInit = function () {
|
||||
|
||||
vm.updateThumbnail();
|
||||
|
||||
}
|
||||
vm.$onDestroy = function () {
|
||||
unwatch();
|
||||
}
|
||||
|
||||
vm.updateThumbnail = function () {
|
||||
if (vm.blockConfigModel.thumbnail == null || vm.blockConfigModel.thumbnail === "") {
|
||||
vm.styleBackgroundImage = "none";
|
||||
return;
|
||||
}
|
||||
|
||||
var path = umbRequestHelper.convertVirtualToAbsolutePath(vm.blockConfigModel.thumbnail);
|
||||
if (path.toLowerCase().endsWith(".svg") === false) {
|
||||
path += "?upscale=false&width=400";
|
||||
}
|
||||
vm.styleBackgroundImage = 'url(\''+path+'\')';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
height: 100%;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@
|
||||
blockPickerModel.clipboardItems.push(
|
||||
{
|
||||
type: "elementType",
|
||||
date: entry.date,
|
||||
pasteData: entry.data,
|
||||
blockConfigModel: modelObject.getScaffoldFromAlias(entry.alias),
|
||||
elementTypeModel: {
|
||||
@@ -471,6 +472,7 @@
|
||||
blockPickerModel.clipboardItems.push(
|
||||
{
|
||||
type: "elementTypeArray",
|
||||
date: entry.date,
|
||||
pasteData: entry.data,
|
||||
blockConfigModel: {}, // no block configuration for paste items of elementTypeArray.
|
||||
elementTypeModel: {
|
||||
@@ -481,6 +483,10 @@
|
||||
);
|
||||
});
|
||||
|
||||
blockPickerModel.clipboardItems.sort( (a, b) => {
|
||||
return b.date - a.date
|
||||
});
|
||||
|
||||
// open block picker overlay
|
||||
editorService.open(blockPickerModel);
|
||||
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
_.each(singleEntriesForPaste, function (entry) {
|
||||
vm.overlayMenu.pasteItems.push({
|
||||
type: "elementType",
|
||||
date: entry.date,
|
||||
name: entry.label,
|
||||
data: entry.data,
|
||||
icon: entry.icon
|
||||
@@ -255,12 +256,17 @@
|
||||
_.each(arrayEntriesForPaste, function (entry) {
|
||||
vm.overlayMenu.pasteItems.push({
|
||||
type: "elementTypeArray",
|
||||
date: entry.date,
|
||||
name: entry.label,
|
||||
data: entry.data,
|
||||
icon: entry.icon
|
||||
});
|
||||
});
|
||||
|
||||
vm.overlayMenu.pasteItems.sort( (a, b) => {
|
||||
return b.date - a.date
|
||||
});
|
||||
|
||||
vm.overlayMenu.title = labels.grid_addElement;
|
||||
vm.overlayMenu.hideHeader = vm.overlayMenu.pasteItems.length > 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user