reverts whitespaces changes, grid changes, thumbnail changes
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
if (!scope.editLabelKey) {
|
||||
scope.editLabelKey = "general_edit";
|
||||
scope.editLabelKey = "general_edit";
|
||||
}
|
||||
userService.getCurrentUser().then(function (u) {
|
||||
var isAdmin = u.userGroups.indexOf('admin') !== -1;
|
||||
|
||||
@@ -8,15 +8,7 @@
|
||||
background: white;
|
||||
width: 100%;
|
||||
|
||||
.title {
|
||||
padding: 12px;
|
||||
color: @gray-3;
|
||||
border-bottom: 1px solid @gray-8;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
text-transform: none;
|
||||
margin: 0 -10px 10px -10px;
|
||||
}
|
||||
.title{padding: 12px; color: @gray-3; border-bottom: 1px solid @gray-8; font-weight: 400; font-size: 16px; text-transform: none; margin: 0 -10px 10px -10px;}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,19 +26,8 @@
|
||||
}
|
||||
|
||||
.umb-card-content {
|
||||
.item-title {
|
||||
color: @blackLight;
|
||||
font-weight: 400;
|
||||
border: none;
|
||||
font-size: 16px;
|
||||
text-transform: none;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: @gray-3;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
.item-title{color: @blackLight; font-weight: 400; border: none; font-size: 16px; text-transform: none; margin-bottom: 3px;}
|
||||
p{color: @gray-3; margin-bottom: 1px;}
|
||||
}
|
||||
|
||||
.umb-card-actions {
|
||||
@@ -152,51 +133,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.umb-card-grid.-detailed {
|
||||
.umb-card-grid-item {
|
||||
padding-top: 0;
|
||||
|
||||
> div {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
font-size: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
flex: 0 0 auto;
|
||||
max-width: 50%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.umb-card-grid-item--title {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.umb-card-grid-item--description {
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.umb-card-grid-item--thumbnail,
|
||||
i {
|
||||
max-width: 120px;
|
||||
margin-right: 10px;
|
||||
float: left;
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
i {
|
||||
width: 120px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
.umb-card-grid .umb-card-grid-item:hover,
|
||||
.umb-card-grid .umb-card-grid-item:focus {
|
||||
|
||||
-4
@@ -14,10 +14,6 @@ function ItemPickerOverlay($scope, localizationService) {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.hasThumbs = function () {
|
||||
return $scope.model.availableItems.some(x => x.thumbnail);
|
||||
};
|
||||
|
||||
$scope.selectItem = function (item) {
|
||||
$scope.model.selectedItem = item;
|
||||
$scope.submitForm($scope.model);
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
<div ng-controller="Umbraco.Overlays.ItemPickerOverlay" class="umb-itempicker">
|
||||
|
||||
<div class="form-search"
|
||||
ng-hide="model.filter === false"
|
||||
style="margin-bottom: 15px;">
|
||||
<div class="form-search" ng-hide="model.filter === false" style="margin-bottom: 15px;">
|
||||
<i class="icon-search"></i>
|
||||
|
||||
<input type="text"
|
||||
ng-model="searchTerm"
|
||||
class="umb-search-field search-query input-block-level -full-width-input"
|
||||
localize="placeholder" placeholder="@placeholders_filter"
|
||||
umb-auto-focus no-dirty-check />
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_filter"
|
||||
umb-auto-focus
|
||||
no-dirty-check />
|
||||
</div>
|
||||
|
||||
<div class="umb-overlay__section-header" ng-if="(model.pasteItems | filter:searchTerm).length > 0">
|
||||
<h5>
|
||||
<localize key="content_createFromClipboard">Paste from clipboard</localize>
|
||||
</h5>
|
||||
<button ng-if="model.clickClearPaste"
|
||||
ng-click="model.clickClearPaste($event)"
|
||||
alt="Clear clipboard for entries accepted in this context.">
|
||||
<h5><localize key="content_createFromClipboard">Paste from clipboard</localize></h5>
|
||||
<button ng-if="model.clickClearPaste" ng-click="model.clickClearPaste($event)" alt="Clear clipboard for entries accepted in this context.">
|
||||
<i class="icon-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<ul class="umb-card-grid" ng-class="{'-three-in-row': model.availableItems.length < 7, '-four-in-row': model.availableItems.length >= 7}">
|
||||
<li ng-repeat="pasteItem in model.pasteItems | filter:searchTerm" ng-click="model.clickPasteItem(pasteItem)">
|
||||
<li ng-repeat="pasteItem in model.pasteItems | filter:searchTerm"
|
||||
ng-click="model.clickPasteItem(pasteItem)">
|
||||
<a class="umb-card-grid-item" href="" title="{{ pasteItem.name }}">
|
||||
<span>
|
||||
<i class="{{ pasteItem.icon }}"></i>
|
||||
@@ -35,37 +31,19 @@
|
||||
</ul>
|
||||
|
||||
<div class="umb-overlay__section-header" ng-if="model.pasteItems.length > 0 && (model.availableItems | filter:searchTerm).length > 0">
|
||||
<h5>
|
||||
<localize key="content_createEmpty">Create new</localize>
|
||||
</h5>
|
||||
<h5><localize key="content_createEmpty">Create new</localize></h5>
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="umb-card-grid" ng-class="{'-three-in-row': model.availableItems.length < 7, '-four-in-row': model.availableItems.length >= 7, '-detailed': hasThumbs()}">
|
||||
<li ng-repeat="availableItem in model.availableItems | compareArrays:model.selectedItems:'alias' | orderBy:model.orderBy | filter:searchTerm" ng-click="selectItem(availableItem)">
|
||||
<a class="umb-card-grid-item"
|
||||
ng-class="{'-has-thumbnail': availableItem.thumbnail}"
|
||||
href=""
|
||||
title="{{ availableItem.name }}">
|
||||
<span ng-if="!hasThumbs()">
|
||||
<ul class="umb-card-grid" ng-class="{'-three-in-row': model.availableItems.length < 7, '-four-in-row': model.availableItems.length >= 7}">
|
||||
<li ng-repeat="availableItem in model.availableItems | compareArrays:model.selectedItems:'alias' | orderBy:model.orderBy | filter:searchTerm"
|
||||
ng-click="selectItem(availableItem)">
|
||||
<a class="umb-card-grid-item" href="" title="{{ availableItem.name }}">
|
||||
<span>
|
||||
<i class="{{ availableItem.icon }}"></i>
|
||||
{{ availableItem.name }}
|
||||
</span>
|
||||
<div ng-if="hasThumbs()" class="flex">
|
||||
<i ng-if="!availableItem.thumbnail" class="{{ availableItem.icon }}"></i>
|
||||
<img ng-if="availableItem.thumbnail"
|
||||
class="umb-card-grid-item--thumbnail self-start"
|
||||
ng-src="{{ availableItem.thumbnail }}?width=120px" />
|
||||
<div class="flex flex-column justify-center">
|
||||
<span class="umb-card-grid-item--title" ng-bind="availableItem.name"></span>
|
||||
<span ng-if="availableItem.description"
|
||||
class="umb-card-grid-item--description"
|
||||
ng-bind="availableItem.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -307,29 +307,22 @@ angular.module("umbraco")
|
||||
$scope.openEditorOverlay = function (event, area, index, key) {
|
||||
var title = "";
|
||||
localizationService.localize("grid_insertControl").then(function (value) {
|
||||
if (area.$allowedEditors.length > 1) {
|
||||
title = value;
|
||||
$scope.editorOverlay = {
|
||||
view: "itempicker",
|
||||
filter: area.$allowedEditors.length > 15,
|
||||
title: title,
|
||||
size: area.$allowedEditors.some(x => x.thumbnail) ? 'large' : 'small',
|
||||
availableItems: area.$allowedEditors,
|
||||
event: event,
|
||||
show: true,
|
||||
submit: function (model) {
|
||||
if (model.selectedItem) {
|
||||
console.log(model.selectedItem);
|
||||
$scope.addControl(model.selectedItem, area, index);
|
||||
$scope.editorOverlay.show = false;
|
||||
$scope.editorOverlay = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
} else {
|
||||
console.log(area.$allowedEditors[0]);
|
||||
$scope.addControl(area.$allowedEditors[0], area, index);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -226,11 +226,7 @@
|
||||
|
||||
<!-- if area is empty tools -->
|
||||
<div class="umb-grid-add-more-content" ng-if="area.controls.length > 0 && !sortMode && (area.maxItems == undefined || area.maxItems == '' || area.maxItems == 0 || area.maxItems > area.controls.length)">
|
||||
<div class="cell-tools-add -bar newbtn" ng-click="openEditorOverlay($event, area, 0, area.$uniqueId);">
|
||||
<localize key="grid_addElement" ng-if="area.$allowedEditors.length > 1"></localize>
|
||||
<span ng-show="area.$allowedEditors.length === 1">
|
||||
<localize key="general_add"></localize> {{ area.$allowedEditors[0].name }}</span>
|
||||
</div>
|
||||
<div class="cell-tools-add -bar newbtn" ng-click="openEditorOverlay($event, area, 0, area.$uniqueId);"><localize key="grid_addElement" /></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -304,7 +300,6 @@
|
||||
ng-if="editorOverlay.show"
|
||||
model="editorOverlay"
|
||||
view="editorOverlay.view"
|
||||
size="editorOverlay.size"
|
||||
position="target">
|
||||
</umb-overlay>
|
||||
|
||||
|
||||
-8
@@ -185,7 +185,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
alias: scaffold.contentTypeAlias,
|
||||
name: scaffold.contentTypeName,
|
||||
icon: iconHelper.convertFromLegacyIcon(scaffold.icon),
|
||||
thumbnail: scaffold.thumbnail,
|
||||
description: scaffold.documentType.description
|
||||
});
|
||||
});
|
||||
@@ -194,11 +193,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.overlayMenu.availableItems.some(x => x.thumbnail)) {
|
||||
$scope.overlayMenu.size = 'large';
|
||||
} else {
|
||||
$scope.overlayMenu.size = $scope.overlayMenu.availableItems.length > 6 ? "medium" : "small";
|
||||
}
|
||||
|
||||
$scope.overlayMenu.pasteItems = [];
|
||||
var availableNodesForPaste = clipboardService.retriveDataOfType("elementType", contentTypeAliases);
|
||||
@@ -434,9 +429,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
});
|
||||
}
|
||||
|
||||
// pass the thumbnail on to the scaffold
|
||||
scaffold.thumbnail = contentType.thumbnail;
|
||||
|
||||
// Store the scaffold object
|
||||
$scope.scaffolds.push(scaffold);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user