Improving nested container element UI.

This commit is contained in:
Sipke Schoorstra
2014-10-16 20:40:14 -07:00
parent 9ebb3966d3
commit bfc72ba5a0
2 changed files with 20 additions and 15 deletions

View File

@@ -1,6 +1,4 @@
@using Orchard.DisplayManagement.Shapes
@using Orchard.DynamicForms.Elements
@using Orchard.Layouts.Helpers
@using Orchard.DynamicForms.Elements
@using Orchard.Utility.Extensions
@{
Style.Include("form.designer.css");
@@ -8,13 +6,9 @@
@{
var element = (Form)Model.Element;
var isTemplated = element.IsTemplated;
var tagBuilder = (OrchardTagBuilder)TagBuilderExtensions.AddCommonElementAttributes(new OrchardTagBuilder("div"), Model);
var formTitle = !String.IsNullOrWhiteSpace(element.Name) ? element.Name.CamelFriendly() : T("Form").Text;
tagBuilder.AddCssClass("x-element x-container x-form");
tagBuilder.Attributes["data-element"] = Model.ElementJson;
}
<div class="x-form x-element x-container @if (isTemplated) {<text>templated</text>}" data-element="@Model.ElementJson">
<div class="x-form x-element x-container x-container-widget @if (isTemplated) {<text>templated</text>}" data-element="@Model.ElementJson">
@if (!isTemplated) {
<div class="drag-handle">
<div class="toolbar form-toolbar group">

View File

@@ -210,12 +210,12 @@
line-height: 2em;
}
.layout-editor .canvas .name {
display: block;
color: #9da0a4;
padding: 0 7px;
float: left;
}
.layout-editor .canvas .name {
display: block;
color: #9da0a4;
padding: 0 7px;
float: left;
}
.layout-editor .canvas article.element-box {
position: relative;
@@ -253,7 +253,7 @@
border-radius: 0 0 2px 2px;
}
.layout-editor .canvas article.element-box:hover .element-overlay {
.layout-editor .canvas article.element-box:hover .element-overlay {
display: block;
}
@@ -281,6 +281,17 @@
border: 1px dashed #bdbcbc;
}
.layout-editor .canvas .x-row .x-column .x-holder .x-container-widget .x-grid {
background: none repeat scroll 0 0 #fafafa;
border: 1px solid #bdbcbc;
margin: 27px 0 0;
position: relative;
}
.layout-editor .canvas .x-container-widget .x-grid .grid-toolbar {
padding: 0 0.5em 0 0.5em;
}
.layout-editor .trash {
display: none;
}