Merge remote-tracking branch 'origin/v8/bugfix/umbBlockCard-should-work-without-blockConfiguration' into v8/feature/AB8699-Support-blocks-in-clipboard-service

This commit is contained in:
Niels Lyngsø
2020-10-21 17:35:10 +02:00
2 changed files with 4 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
<div class="__showcase"
ng-class="{'--error':vm.elementTypeModel === null}"
ng-style="{'background-color':vm.blockConfigModel.backgroundColor, 'background-image': vm.styleBackgroundImage}">
<i ng-if="vm.blockConfigModel.thumbnail == null" class="__icon {{ vm.elementTypeModel ? vm.elementTypeModel.icon : 'icon-block' }}" ng-attr-style="{{'color:'+vm.blockConfigModel.iconColor+' !important'}}" aria-hidden="true"></i>
ng-style="{'background-color': vm.blockConfigModel ? vm.blockConfigModel.backgroundColor : '', 'background-image': vm.styleBackgroundImage}">
<i ng-if="vm.blockConfigModel == null || vm.blockConfigModel.thumbnail == null" class="__icon {{ vm.elementTypeModel ? vm.elementTypeModel.icon : 'icon-block' }}" ng-attr-style="{{'color:'+vm.blockConfigModel.iconColor+' !important'}}" aria-hidden="true"></i>
</div>
<div class="__info" ng-if="vm.elementTypeModel !== null">
<div class="__name" ng-bind="vm.elementTypeModel.name"></div>

View File

@@ -9,7 +9,7 @@
controllerAs: "vm",
transclude: true,
bindings: {
blockConfigModel: "<",
blockConfigModel: "<?",
elementTypeModel: "<"
}
});
@@ -35,7 +35,7 @@
}
vm.updateThumbnail = function () {
if (vm.blockConfigModel.thumbnail == null || vm.blockConfigModel.thumbnail === "") {
if (vm.blockConfigModel == null || vm.blockConfigModel.thumbnail == null || vm.blockConfigModel.thumbnail === "") {
vm.styleBackgroundImage = "none";
return;
}