use active to determine if an inline editor is expanded. To enable the inline editor to be expanded on creation.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<div class="__plus" ng-style="{'left':inlineCreateButtonCtrl.plusPosX}">+</div>
|
||||
</button>
|
||||
|
||||
<div class="umb-block-list__block" ng-class="{'--open':layout.$block.isOpen}">
|
||||
<div class="umb-block-list__block" ng-class="{'--active':layout.$block.active}">
|
||||
|
||||
<umb-block-list-scoped-block-content ng-if="layout.$block.config.stylesheet" class="umb-block-list__block--content blockelement__draggable-element" view="{{layout.$block.view}}" stylesheet="/{{::layout.$block.config.stylesheet}}" api="vm.blockEditorApi" block="layout.$block" index="$index">
|
||||
</umb-block-list-scoped-block-content>
|
||||
|
||||
@@ -228,6 +228,10 @@
|
||||
|
||||
blockObject.active = true;
|
||||
|
||||
if (inlineEditing === true && openSettings !== true) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make a clone to avoid editing model directly.
|
||||
var blockContentClone = Utilities.copy(blockObject.content);
|
||||
var blockSettingsClone = null;
|
||||
@@ -304,7 +308,7 @@
|
||||
|
||||
if(!(mouseEvent.ctrlKey || mouseEvent.metaKey)) {
|
||||
editorService.close();
|
||||
if (added && vm.model.config.useInlineEditingAsDefault !== true && vm.layout.length > createIndex) {
|
||||
if (added && vm.layout.length > createIndex) {
|
||||
editBlock(vm.layout[createIndex].$block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within,
|
||||
&.--open {
|
||||
&.--active {
|
||||
|
||||
> .umb-block-list__block--actions {
|
||||
opacity: 1;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
const bc = this;
|
||||
|
||||
bc.openBlock = function(block) {
|
||||
block.isOpen = !block.isOpen;
|
||||
block.active = !block.active;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<i class="icon {{block.content.icon}}"></i>
|
||||
<span>{{block.label}}</span>
|
||||
</button>
|
||||
<div class="blockelement-inlineblock-editor__inner" ng-class="{'--singleGroup':block.content.variants[0].tabs.length === 1}" ng-if="block.isOpen === true">
|
||||
<div class="blockelement-inlineblock-editor__inner" ng-class="{'--singleGroup':block.content.variants[0].tabs.length === 1}" ng-if="block.active === true">
|
||||
<umb-element-editor-content model="block.content"></umb-element-editor-content>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
border-radius: @baseBorderRadius;
|
||||
transition: border-color 120ms;
|
||||
|
||||
.umb-block-list__block:not(.--open) &:hover {
|
||||
.umb-block-list__block:not(.--active) &:hover {
|
||||
border-color: @gray-8;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.umb-block-list__block.--open & {
|
||||
.umb-block-list__block.--active & {
|
||||
border-color: @gray-8;
|
||||
box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.05);
|
||||
> button {
|
||||
|
||||
Reference in New Issue
Block a user