From db65a03a3c7a109503dfc9351878e969842a2b1e Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Fri, 9 Apr 2021 13:32:48 +0200 Subject: [PATCH] Print layout-field-preview before children --- modules/Cockpit/assets/components.js | 2 +- modules/Cockpit/assets/components/field-layout.tag | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Cockpit/assets/components.js b/modules/Cockpit/assets/components.js index 22e980fba..c7fe32807 100755 --- a/modules/Cockpit/assets/components.js +++ b/modules/Cockpit/assets/components.js @@ -2856,7 +2856,7 @@ riot.tag2('field-image', '
}); -riot.tag2('field-layout', '
{itemDisplayName(item, parent)} {componentDisplayName(item.component, parent)}

{App.i18n.get(\'Components\')}

{component.label || App.Utils.ucfirst(name)}

{components[settingsComponent.component].label || App.Utils.ucfirst(settingsComponent.component)}

{field.info}
', 'field-layout .layout-components > div,[data-is="field-layout"] .layout-components > div{ margin-bottom: 5px; } field-layout .field-layout-column-label,[data-is="field-layout"] .field-layout-column-label{ font-size: .8em; font-weight: bold; } field-layout .uk-sortable-placeholder .uk-sortable,[data-is="field-layout"] .uk-sortable-placeholder .uk-sortable{ pointer-events: none; } field-layout .layout-components.empty,[data-is="field-layout"] .layout-components.empty{ min-height: 100px; background: rgba(0,0,0,.01); } field-layout .layout-components.empty:after,[data-is="field-layout"] .layout-components.empty:after{ font-family: FontAwesome; content: "\\f1b3"; position: absolute; top: 50%; left: 50%; font-size: 14px; transform: translate3d(-50%, -50%, 0); color: rgba(0,0,0,.3); } field-layout .layout-field-preview,[data-is="field-layout"] .layout-field-preview{ display: block; margin-top: 8px; padding-top: 6px; border-top: 1px rgba(0,0,0,.05) dotted; } field-layout .layout-field-preview canvas,[data-is="field-layout"] .layout-field-preview canvas{ background-size: contain; background-position: 50% 50%; background-repeat: no-repeat; } field-layout .layout-field-preview:empty,[data-is="field-layout"] .layout-field-preview:empty{ display:none } field-layout .field-layout-component-badge,[data-is="field-layout"] .field-layout-component-badge{ padding: .2em .2em; font-size: 80%; line-height: 1; }', '', function(opts) { +riot.tag2('field-layout', '
{itemDisplayName(item, parent)} {componentDisplayName(item.component, parent)}

{App.i18n.get(\'Components\')}

{component.label || App.Utils.ucfirst(name)}

{components[settingsComponent.component].label || App.Utils.ucfirst(settingsComponent.component)}

{field.info}
', 'field-layout .layout-components > div,[data-is="field-layout"] .layout-components > div{ margin-bottom: 5px; } field-layout .field-layout-column-label,[data-is="field-layout"] .field-layout-column-label{ font-size: .8em; font-weight: bold; } field-layout .uk-sortable-placeholder .uk-sortable,[data-is="field-layout"] .uk-sortable-placeholder .uk-sortable{ pointer-events: none; } field-layout .layout-components.empty,[data-is="field-layout"] .layout-components.empty{ min-height: 100px; background: rgba(0,0,0,.01); } field-layout .layout-components.empty:after,[data-is="field-layout"] .layout-components.empty:after{ font-family: FontAwesome; content: "\\f1b3"; position: absolute; top: 50%; left: 50%; font-size: 14px; transform: translate3d(-50%, -50%, 0); color: rgba(0,0,0,.3); } field-layout .layout-field-preview,[data-is="field-layout"] .layout-field-preview{ display: block; margin-top: 8px; padding-top: 6px; border-top: 1px rgba(0,0,0,.05) dotted; } field-layout .layout-field-preview canvas,[data-is="field-layout"] .layout-field-preview canvas{ background-size: contain; background-position: 50% 50%; background-repeat: no-repeat; } field-layout .layout-field-preview:empty,[data-is="field-layout"] .layout-field-preview:empty{ display:none } field-layout .field-layout-component-badge,[data-is="field-layout"] .field-layout-component-badge{ padding: .2em .2em; font-size: 80%; line-height: 1; }', '', function(opts) { var $this = this; diff --git a/modules/Cockpit/assets/components/field-layout.tag b/modules/Cockpit/assets/components/field-layout.tag index 2473cf0df..949a024a1 100644 --- a/modules/Cockpit/assets/components/field-layout.tag +++ b/modules/Cockpit/assets/components/field-layout.tag @@ -74,6 +74,8 @@
+ +
@@ -82,8 +84,6 @@ - -