From d5f75a242d7cb4909776e73617bbfe9ffff4b4d0 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Sun, 19 Apr 2015 11:31:53 +0200 Subject: [PATCH] Implemented element rules. --- ...ClientValidationRegistrationCoordinator.cs | 1 + .../Orchard.DynamicForms/Scripts/Forms.js | 5 ++- .../Orchard.DynamicForms/Scripts/Forms.min.js | 2 +- .../Scripts/Layouts/Models/Form.js | 5 ++- .../ElementCreatingDisplayShapeContext.cs | 1 + .../Framework/Display/ElementDisplay.cs | 11 +++-- .../Framework/Elements/Element.cs | 1 + .../Handlers/ElementRuleCoordinator.cs | 35 ++++++++++++++++ .../Modules/Orchard.Layouts/Module.txt | 2 +- .../Orchard.Layouts/Orchard.Layouts.csproj | 8 ++++ .../Modules/Orchard.Layouts/Scripts/Models.js | 40 +++++++++++-------- .../Orchard.Layouts/Scripts/Models.min.js | 2 +- .../Orchard.Layouts/Scripts/Models/Canvas.js | 5 ++- .../Orchard.Layouts/Scripts/Models/Column.js | 5 ++- .../Orchard.Layouts/Scripts/Models/Content.js | 7 ++-- .../Orchard.Layouts/Scripts/Models/Element.js | 6 ++- .../Orchard.Layouts/Scripts/Models/Grid.js | 5 ++- .../Orchard.Layouts/Scripts/Models/Html.js | 7 ++-- .../Orchard.Layouts/Scripts/Models/Row.js | 5 ++- .../Services/DefaultModelMaps.cs | 4 ++ .../Services/ElementEventHandlerBase.cs | 1 + .../Services/ElementSerializer.cs | 27 +++++++------ .../Services/IElementEventHandler.cs | 1 + .../Orchard.Layouts/Styles/LayoutEditor.css | 8 ++++ .../Styles/LayoutEditor.min.css | 2 +- .../Styles/LayoutEditor/Popup.css | 8 ++++ .../Styles/LayoutEditor/Popup.less | 9 +++++ .../Styles/LayoutEditor/Popup.min.css | 2 +- .../Views/LayoutEditor.Template.Html.cshtml | 1 + .../LayoutEditor.Template.Properties.cshtml | 2 +- .../Views/LayoutEditor.Template.Rule.cshtml | 12 ++++++ .../Orchard.Widgets/RuleEngine/RuleManager.cs | 1 - 32 files changed, 173 insertions(+), 58 deletions(-) create mode 100644 src/Orchard.Web/Modules/Orchard.Layouts/Handlers/ElementRuleCoordinator.cs create mode 100644 src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Rule.cshtml diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/ClientValidationRegistrationCoordinator.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/ClientValidationRegistrationCoordinator.cs index 45c7f232a..3b6915740 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/ClientValidationRegistrationCoordinator.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Handlers/ClientValidationRegistrationCoordinator.cs @@ -45,6 +45,7 @@ namespace Orchard.DynamicForms.Handlers { context.ElementShape.ClientValidationAttributes = registrationContext.ClientAttributes; } + void IElementEventHandler.CreatingDisplay(ElementCreatingDisplayShapeContext context) { } void IElementEventHandler.Displayed(ElementDisplayedContext context) {} void IFormElementEventHandler.GetElementValue(FormElement element, ReadElementValuesContext context) { } void IElementEventHandler.Creating(ElementCreatingContext context) {} diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.js b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.js index 5ec65f2fe..da6d36d90 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.js +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.js @@ -30,8 +30,8 @@ var LayoutEditor; (function ($, LayoutEditor) { - LayoutEditor.Form = function (data, htmlId, htmlClass, htmlStyle, isTemplated, name, formBindingContentType, contentType, contentTypeLabel, contentTypeClass, hasEditor, children) { - LayoutEditor.Element.call(this, "Form", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Form = function (data, htmlId, htmlClass, htmlStyle, isTemplated, name, formBindingContentType, contentType, contentTypeLabel, contentTypeClass, hasEditor, rule, children) { + LayoutEditor.Element.call(this, "Form", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); var self = this; @@ -96,6 +96,7 @@ var LayoutEditor; value.contentTypeLabel, value.contentTypeClass, value.hasEditor, + value.rule, LayoutEditor.childrenFrom(value.children)); }; diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.min.js b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.min.js index 8bd0641f6..14ac67c5a 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.min.js +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.min.js @@ -1 +1 @@ -angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(n,t,i){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(n,i){t.configureForElement(n,i);t.configureForContainer(n,i);n.sortableOptions.axis="y";n.edit=function(){n.$root.editElement(n.element).then(function(t){t.cancel||(n.element.data=decodeURIComponent(t.element.data),n.element.name=t.elementEditorModel.name,n.element.formBindingContentType=t.elementEditorModel.formBindingContentType,n.$apply())})}}],templateUrl:i.templateUrl("Form"),replace:!0}}]);var LayoutEditor;(function(n,t){t.Form=function(i,r,u,f,e,o,s,h,c,l,a,v){var y,p;t.Element.call(this,"Form",i,r,u,f,e);t.Container.call(this,["Grid","Content"],v);y=this;this.isContainable=!0;this.dropTargetClass="layout-common-holder";this.contentType=h;this.contentTypeLabel=c;this.contentTypeClass=l;this.name=o||"Untitled";this.formBindingContentType=s;this.hasEditor=a;this.toObject=function(){var n=this.elementToObject();return n.name=this.name,n.formBindingContentType=this.formBindingContentType,n.children=this.childrenToObject(),n};p=this.getEditorObject;this.getEditorObject=function(){var t=p();return n.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})};this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=y;y.linkChild(n)})};this.linkChild=function(t){var i=t.getEditorObject;t.getEditorObject=function(){var t=i();return n.extend(t,{FormBindingContentType:y.formBindingContentType})}};this.setChildren(v)};t.Form.from=function(n){return new t.Form(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.name,n.formBindingContentType,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.hasEditor,t.childrenFrom(n.children))};t.registerFactory("Form",function(n){return t.Form.from(n)})})(jQuery,LayoutEditor||(LayoutEditor={})); \ No newline at end of file +angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(n,t,i){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(n,i){t.configureForElement(n,i);t.configureForContainer(n,i);n.sortableOptions.axis="y";n.edit=function(){n.$root.editElement(n.element).then(function(t){t.cancel||(n.element.data=decodeURIComponent(t.element.data),n.element.name=t.elementEditorModel.name,n.element.formBindingContentType=t.elementEditorModel.formBindingContentType,n.$apply())})}}],templateUrl:i.templateUrl("Form"),replace:!0}}]);var LayoutEditor;(function(n,t){t.Form=function(i,r,u,f,e,o,s,h,c,l,a,v,y){var p,w;t.Element.call(this,"Form",i,r,u,f,e,v);t.Container.call(this,["Grid","Content"],y);p=this;this.isContainable=!0;this.dropTargetClass="layout-common-holder";this.contentType=h;this.contentTypeLabel=c;this.contentTypeClass=l;this.name=o||"Untitled";this.formBindingContentType=s;this.hasEditor=a;this.toObject=function(){var n=this.elementToObject();return n.name=this.name,n.formBindingContentType=this.formBindingContentType,n.children=this.childrenToObject(),n};w=this.getEditorObject;this.getEditorObject=function(){var t=w();return n.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})};this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=p;p.linkChild(n)})};this.linkChild=function(t){var i=t.getEditorObject;t.getEditorObject=function(){var t=i();return n.extend(t,{FormBindingContentType:p.formBindingContentType})}};this.setChildren(y)};t.Form.from=function(n){return new t.Form(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.name,n.formBindingContentType,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.hasEditor,n.rule,t.childrenFrom(n.children))};t.registerFactory("Form",function(n){return t.Form.from(n)})})(jQuery,LayoutEditor||(LayoutEditor={})); \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Layouts/Models/Form.js b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Layouts/Models/Form.js index 999dcf900..564853032 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Layouts/Models/Form.js +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Layouts/Models/Form.js @@ -1,8 +1,8 @@ var LayoutEditor; (function ($, LayoutEditor) { - LayoutEditor.Form = function (data, htmlId, htmlClass, htmlStyle, isTemplated, name, formBindingContentType, contentType, contentTypeLabel, contentTypeClass, hasEditor, children) { - LayoutEditor.Element.call(this, "Form", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Form = function (data, htmlId, htmlClass, htmlStyle, isTemplated, name, formBindingContentType, contentType, contentTypeLabel, contentTypeClass, hasEditor, rule, children) { + LayoutEditor.Element.call(this, "Form", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); var self = this; @@ -67,6 +67,7 @@ value.contentTypeLabel, value.contentTypeClass, value.hasEditor, + value.rule, LayoutEditor.childrenFrom(value.children)); }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementCreatingDisplayShapeContext.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementCreatingDisplayShapeContext.cs index 22a7af130..2b876a8e5 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementCreatingDisplayShapeContext.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementCreatingDisplayShapeContext.cs @@ -6,5 +6,6 @@ namespace Orchard.Layouts.Framework.Display { public IContent Content { get; set; } public Element Element { get; set; } public string DisplayType { get; set; } + public bool Cancel { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementDisplay.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementDisplay.cs index 9dcd68729..313adff92 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementDisplay.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Display/ElementDisplay.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using Orchard.ContentManagement; -using Orchard.Core.Shapes; using Orchard.DisplayManagement; using Orchard.Layouts.Elements; using Orchard.Layouts.Framework.Drivers; @@ -34,8 +33,12 @@ namespace Orchard.Layouts.Framework.Display { Content = content, }; + _elementEventHandlerHandler.CreatingDisplay(createShapeContext); element.Descriptor.CreatingDisplay(createShapeContext); + if (createShapeContext.Cancel) + return null; + var typeName = element.GetType().Name; var category = element.Category.ToSafeName(); var drivers = element.Descriptor.GetDrivers().ToList(); @@ -69,8 +72,10 @@ namespace Orchard.Layouts.Framework.Display { var childIndex = 0; foreach (var child in container.Elements) { var childShape = DisplayElement(child, content, displayType: displayType, updater: updater); - childShape.Parent = elementShape; - elementShape.Add(childShape, childIndex++.ToString()); + if (childShape != null) { + childShape.Parent = elementShape; + elementShape.Add(childShape, childIndex++.ToString()); + } } } } diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Elements/Element.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Elements/Element.cs index 541623417..87959efaf 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Elements/Element.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Framework/Elements/Element.cs @@ -41,6 +41,7 @@ namespace Orchard.Layouts.Framework.Elements { public string HtmlId { get; set; } public string HtmlClass { get; set; } public string HtmlStyle { get; set; } + public string Rule { get; set; } public ElementDataDictionary ExportableData { get; set; } public ElementDescriptor Descriptor { get; set; } public ElementDataDictionary Data { get; set; } diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Handlers/ElementRuleCoordinator.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Handlers/ElementRuleCoordinator.cs new file mode 100644 index 000000000..05ace83fd --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Handlers/ElementRuleCoordinator.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using Orchard.Layouts.Framework.Display; +using Orchard.Layouts.Services; +using Orchard.Widgets.Services; + +namespace Orchard.Layouts.Handlers { + public class ElementRuleCoordinator : ElementEventHandlerBase { + private readonly IRuleManager _ruleManager; + private readonly Dictionary _evaluations = new Dictionary(); + + public ElementRuleCoordinator(IRuleManager ruleManager) { + _ruleManager = ruleManager; + } + + public override void CreatingDisplay(ElementCreatingDisplayShapeContext context) { + if (context.DisplayType == "Design") + return; + + if (String.IsNullOrWhiteSpace(context.Element.Rule)) + return; + + context.Cancel = !EvaluateRule(context.Element.Rule); + } + + private bool EvaluateRule(string rule) { + if (_evaluations.ContainsKey(rule)) + return _evaluations[rule]; + + var result = _ruleManager.Matches(rule); + _evaluations[rule] = result; + return result; + } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Module.txt b/src/Orchard.Web/Modules/Orchard.Layouts/Module.txt index b128089f6..0d72425bb 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Module.txt @@ -10,7 +10,7 @@ Features: Orchard.Layouts: Name: Layouts Description: Provides tools to create layouts. - Dependencies: Common, Orchard.jQuery, Orchard.Forms, Orchard.Tokens, Orchard.MediaLibrary, TinyMCE + Dependencies: Common, Orchard.jQuery, Orchard.Forms, Orchard.Tokens, Orchard.MediaLibrary, TinyMCE, Orchard.Widgets Category: Layout Orchard.Layouts.Snippets: Name: Layout Snippets diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj b/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj index 24d89c4a7..c03801bbb 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj @@ -413,6 +413,10 @@ {6f759635-13d7-4e94-bcc9-80445d63f117} Orchard.Tokens + + {194d3ccc-1153-474d-8176-fde8d7d0d0bd} + Orchard.Widgets + @@ -441,6 +445,7 @@ + @@ -617,6 +622,9 @@ + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.js index 3165637ef..93fd82db7 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.js @@ -76,7 +76,7 @@ var LayoutEditor; var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Element = function (type, data, htmlId, htmlClass, htmlStyle, isTemplated) { + LayoutEditor.Element = function (type, data, htmlId, htmlClass, htmlStyle, isTemplated, rule) { if (!type) throw new Error("Parameter 'type' is required."); @@ -86,6 +86,7 @@ var LayoutEditor; this.htmlClass = htmlClass; this.htmlStyle = htmlStyle; this.isTemplated = isTemplated; + this.rule = rule; this.editor = null; this.parent = null; @@ -221,7 +222,8 @@ var LayoutEditor; htmlId: this.htmlId, htmlClass: this.htmlClass, htmlStyle: this.htmlStyle, - isTemplated: this.isTemplated + isTemplated: this.isTemplated, + rule: this.rule }; }; @@ -387,8 +389,8 @@ var LayoutEditor; var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); this.toObject = function () { @@ -405,6 +407,7 @@ var LayoutEditor; value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); }; @@ -413,8 +416,8 @@ var LayoutEditor; var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Grid = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Grid", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Grid = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Grid", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Row"], children); this.toObject = function () { @@ -431,6 +434,7 @@ var LayoutEditor; value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; @@ -442,8 +446,8 @@ var LayoutEditor; var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Row = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Row", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Row = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Row", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Column"], children); var _self = this; @@ -716,6 +720,7 @@ var LayoutEditor; value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; @@ -726,8 +731,8 @@ var LayoutEditor; })(LayoutEditor || (LayoutEditor = {})); var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, zoneName, collapsible, children) { - LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, zoneName, collapsible, rule, children) { + LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); this.width = width; @@ -843,6 +848,7 @@ var LayoutEditor; value.offset, value.zoneName, value.collapsible, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; @@ -869,8 +875,8 @@ var LayoutEditor; var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Content = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor) { - LayoutEditor.Element.call(this, "Content", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Content = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor, rule) { + LayoutEditor.Element.call(this, "Content", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); this.contentType = contentType; this.contentTypeLabel = contentTypeLabel; @@ -918,7 +924,8 @@ var LayoutEditor; value.contentTypeLabel, value.contentTypeClass, value.html, - value.hasEditor); + value.hasEditor, + value.rule); return result; }; @@ -927,8 +934,8 @@ var LayoutEditor; var LayoutEditor; (function ($, LayoutEditor) { - LayoutEditor.Html = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor) { - LayoutEditor.Element.call(this, "Html", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Html = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor, rule) { + LayoutEditor.Element.call(this, "Html", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); this.contentType = contentType; this.contentTypeLabel = contentTypeLabel; @@ -985,7 +992,8 @@ var LayoutEditor; value.contentTypeLabel, value.contentTypeClass, value.html, - value.hasEditor); + value.hasEditor, + value.rule); return result; }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js index be14c9f24..435180b27 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js @@ -1 +1 @@ -var LayoutEditor;(function(n){Array.prototype.move=function(n,t){this.splice(t,0,this.splice(n,1)[0])};n.childrenFrom=function(t){return _(t).map(function(t){return n.elementFrom(t)})};var t=n.registerFactory=function(t,i){var r=n.factories=n.factories||{};r[t]=i};t("Grid",function(t){return n.Grid.from(t)});t("Row",function(t){return n.Row.from(t)});t("Column",function(t){return n.Column.from(t)});t("Content",function(t){return n.Content.from(t)});n.elementFrom=function(t){var i=n.factories[t.type];if(!i)throw new Error('No element with type "'+t.type+'" was found.');return i(t)};n.setModel=function(n,t){$(n).scope().element=t};n.getModel=function(n){return $(n).scope().element}})(LayoutEditor||(LayoutEditor={})),function(n){n.Editor=function(t,i){this.config=t;this.canvas=n.Canvas.from(i);this.initialState=JSON.stringify(this.canvas.toObject());this.activeElement=null;this.focusedElement=null;this.dropTargetElement=null;this.isDragging=!1;this.inlineEditingIsActive=!1;this.isResizing=!1;this.resetToolboxElements=function(){this.toolboxElements=[n.Row.from({children:[]})]};this.isDirty=function(){var n=JSON.stringify(this.canvas.toObject());return this.initialState!=n};this.resetToolboxElements();this.canvas.setEditor(this)}}(LayoutEditor||(LayoutEditor={})),function(n){n.Element=function(n,t,i,r,u,f){if(!n)throw new Error("Parameter 'type' is required.");this.type=n;this.data=t;this.htmlId=i;this.htmlClass=r;this.htmlStyle=u;this.isTemplated=f;this.editor=null;this.parent=null;this.setIsFocusedEventHandlers=[];this.setEditor=function(n){this.editor=n;!!this.children&&_.isArray(this.children)&&_(this.children).each(function(t){t.setEditor(n)})};this.setParent=function(n){this.parent=n;!this.parent.linkChild||this.parent.linkChild(this)};this.setIsTemplated=function(n){this.isTemplated=n;!!this.children&&_.isArray(this.children)&&_(this.children).each(function(t){t.setIsTemplated(n)})};this.getIsActive=function(){return this.editor?this.editor.activeElement===this&&!this.getIsFocused():!1};this.setIsActive=function(n){this.editor&&(this.editor.isDragging||this.editor.inlineEditingIsActive||this.editor.isResizing||(this.editor.activeElement=n?this:this.parent))};this.getIsFocused=function(){return this.editor?this.editor.focusedElement===this:!1};this.setIsFocused=function(){this.editor&&(this.isTemplated||this.editor.isDragging||this.editor.inlineEditingIsActive||this.editor.isResizing||(this.editor.focusedElement=this,_(this.setIsFocusedEventHandlers).each(function(n){try{n()}catch(t){}})))};this.getIsSelected=function(){return this.getIsFocused()?!0:!!this.children&&_.isArray(this.children)?_(this.children).any(function(n){return n.getIsSelected()}):!1};this.getIsDropTarget=function(){return this.editor?this.editor.dropTargetElement===this:!1};this.setIsDropTarget=function(n){this.editor&&(this.editor.dropTargetElement=n?this:null)};this.delete=function(){!this.parent||this.parent.deleteChild(this)};this.canMoveUp=function(){return this.parent?this.parent.canMoveChildUp(this):!1};this.moveUp=function(){!this.parent||this.parent.moveChildUp(this)};this.canMoveDown=function(){return this.parent?this.parent.canMoveChildDown(this):!1};this.moveDown=function(){!this.parent||this.parent.moveChildDown(this)};this.elementToObject=function(){return{type:this.type,data:this.data,htmlId:this.htmlId,htmlClass:this.htmlClass,htmlStyle:this.htmlStyle,isTemplated:this.isTemplated}};this.getEditorObject=function(){return{}};this.copy=function(n){var t=this.getInnerText(),i,r;n.setData("text/plain",t);console.log(t);i=this.toObject();r=JSON.stringify(i,null,"\t");n.setData("text/json",r)};this.cut=function(n){this.copy(n);this.delete()};this.paste=function(n){!this.parent||this.parent.paste(n)}}}(LayoutEditor||(LayoutEditor={})),function(n){n.Container=function(t,i){this.allowedChildTypes=t;this.children=i;this.isContainer=!0;var r=this;this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=r})};this.setChildren(i);this.getIsSealed=function(){return _(this.children).any(function(n){return n.isTemplated})};this.addChild=function(n){!_(this.children).contains(n)&&(_(this.allowedChildTypes).contains(n.type)||n.isContainable)&&this.children.push(n);n.setEditor(this.editor);n.setIsTemplated(!1);n.parent=this};this.deleteChild=function(n){var t=_(this.children).indexOf(n);t>=0&&(this.children.splice(t,1),n.getIsActive()&&(this.editor.activeElement=null),n.getIsFocused()&&(this.children.length>t?this.children[t].setIsFocused():t>0?this.children[t-1].setIsFocused():this.setIsFocused()))};this.moveFocusPrevChild=function(n){if(!(this.children.length<2)){var t=_(this.children).indexOf(n);t>0&&this.children[t-1].setIsFocused()}};this.moveFocusNextChild=function(n){if(!(this.children.length<2)){var t=_(this.children).indexOf(n);t0};this.canMoveChildDown=function(n){var t=_(this.children).indexOf(n);return t0?n.width<12:t<0?n.width>1:!1}var t,f,r,u;if(n==0)return!0;for(t=n,t<0&&(f=12-l(),t+=f,t>0&&(t=0));t<0&&_(s.children).any(function(n){return n.offset>0});)for(i=0;i0&&(r.offset--,t++);while(t!=0){if(!_(s.children).any(e))break;for(i=0;i=0?n.width>1:!1};this.contractColumnRight=function(n,t){var i,r;this.canContractColumnRight(n,t)&&(i=_(this.children).indexOf(n),i>=0&&n.width>1&&(n.width--,this.children.length>i+1&&(r=this.children[i+1],t&&r.offset==0?r.width++:r.offset++)))};this.canExpandColumnRight=function(n,t){var r=_(this.children).indexOf(n),i;return r>=0?n.width>=12?!1:this.children.length>r+1?(i=this.children[r+1],t&&i.offset==0?i.width>1:i.offset>0):l()<12:!1};this.expandColumnRight=function(n,t){var i,r;this.canExpandColumnRight(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(this.children.length>i+1&&(r=this.children[i+1],t&&r.offset==0?r.width--:r.offset--),n.width++))};this.canExpandColumnLeft=function(n,t){var i=_(this.children).indexOf(n),r;return i>=0?n.width>=12?!1:i>0&&(r=this.children[i-1],t&&n.offset==0)?r.width>1:n.offset>0:!1};this.expandColumnLeft=function(n,t){var i,r;this.canExpandColumnLeft(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(i>0?(r=this.children[i-1],t&&n.offset==0?r.width--:n.offset--):n.offset--,n.width++))};this.canContractColumnLeft=function(n){var t=_(this.children).indexOf(n);return t>=0?n.width>1:!1};this.contractColumnLeft=function(n,t){var i,r;this.canContractColumnLeft(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(i>0?(r=this.children[i-1],t&&n.offset==0?r.width++:n.offset++):n.offset++,n.width--))};this.evenColumns=function(){var t,n;this.children.length!=0&&(t=Math.floor(12/this.children.length),_(this.children).each(function(n){n.width=t;n.offset=0}),n=12%this.children.length,n>0&&c(n))};v=this.pasteChild;this.pasteChild=function(n){n.type=="Column"?this.beginAddColumn(n.width)&&(this.commitAddColumn(),v.call(this,n)):!this.parent||this.parent.pasteChild(n)};this.toObject=function(){var n=this.elementToObject();return n.children=this.childrenToObject(),n}};n.Row.from=function(t){var i=new n.Row(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,n.childrenFrom(t.children));return i.toolboxIcon=t.toolboxIcon,i.toolboxLabel=t.toolboxLabel,i.toolboxDescription=t.toolboxDescription,i}}(LayoutEditor||(LayoutEditor={})),function(n){n.Column=function(t,i,r,u,f,e,o,s,h,c){n.Element.call(this,"Column",t,i,r,u,f);n.Container.call(this,["Grid","Content"],c);this.width=e;this.offset=o;this.zoneName=s;this.collapsible=h;var l=!1,a=0,v=0;this.beginChange=function(){if(!!l)throw new Error("Column already has a pending change.");l=!0;a=this.width;v=this.offset};this.commitChange=function(){if(!l)throw new Error("Column has no pending change.");a=0;v=0;l=!1};this.rollbackChange=function(){if(!l)throw new Error("Column has no pending change.");this.width=a;this.offset=v;a=0;v=0;l=!1};this.canSplit=function(){return this.width>1};this.split=function(){if(this.canSplit()){var t=Math.floor(this.width/2),i=n.Column.from({data:null,htmlId:null,htmlClass:null,htmlStyle:null,width:t,offset:0,children:[]});this.width=this.width-t;this.parent.insertChild(i,this);i.setIsFocused()}};this.canContractRight=function(n){return this.parent.canContractColumnRight(this,n)};this.contractRight=function(n){this.parent.contractColumnRight(this,n)};this.canExpandRight=function(n){return this.parent.canExpandColumnRight(this,n)};this.expandRight=function(n){this.parent.expandColumnRight(this,n)};this.canExpandLeft=function(n){return this.parent.canExpandColumnLeft(this,n)};this.expandLeft=function(n){this.parent.expandColumnLeft(this,n)};this.canContractLeft=function(n){return this.parent.canContractColumnLeft(this,n)};this.contractLeft=function(n){this.parent.contractColumnLeft(this,n)};this.toObject=function(){var n=this.elementToObject();return n.width=this.width,n.offset=this.offset,n.zoneName=this.zoneName,n.collapsible=this.collapsible,n.children=this.childrenToObject(),n}};n.Column.from=function(t){var i=new n.Column(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,t.width,t.offset,t.zoneName,t.collapsible,n.childrenFrom(t.children));return i.toolboxIcon=t.toolboxIcon,i.toolboxLabel=t.toolboxLabel,i.toolboxDescription=t.toolboxDescription,i};n.Column.times=function(t){return _.times(t,function(){return n.Column.from({data:null,htmlId:null,htmlClass:null,isTemplated:!1,width:12/t,offset:0,zoneName:null,collapsible:null,children:[]})})}}(LayoutEditor||(LayoutEditor={})),function(n){n.Content=function(t,i,r,u,f,e,o,s,h,c){n.Element.call(this,"Content",t,i,r,u,f);this.contentType=e;this.contentTypeLabel=o;this.contentTypeClass=s;this.html=h;this.hasEditor=c;this.getInnerText=function(){return $($.parseHTML("
"+this.html+"<\/div>")).text()};this.setHtml=function(n){this.html=n;this.htmlUnsafe=n};this.toObject=function(){return{type:"Content"}};this.toObject=function(){var n=this.elementToObject();return n.contentType=this.contentType,n.contentTypeLabel=this.contentTypeLabel,n.contentTypeClass=this.contentTypeClass,n.html=this.html,n.hasEditor=c,n};this.setHtml(h)};n.Content.from=function(t){return new n.Content(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,t.contentType,t.contentTypeLabel,t.contentTypeClass,t.html,t.hasEditor)}}(LayoutEditor||(LayoutEditor={})),function(n,t){t.Html=function(i,r,u,f,e,o,s,h,c,l){t.Element.call(this,"Html",i,r,u,f,e);this.contentType=o;this.contentTypeLabel=s;this.contentTypeClass=h;this.html=c;this.hasEditor=l;this.isContainable=!0;this.getInnerText=function(){return n(n.parseHTML("
"+this.html+"<\/div>")).text()};this.setHtml=function(n){this.html=n;this.htmlUnsafe=n};this.toObject=function(){return{type:"Html"}};this.toObject=function(){var n=this.elementToObject();return n.contentType=this.contentType,n.contentTypeLabel=this.contentTypeLabel,n.contentTypeClass=this.contentTypeClass,n.html=this.html,n.hasEditor=l,n};var a=this.getEditorObject;this.getEditorObject=function(){var t=a();return n.extend(t,{Content:this.html})};this.setHtml(c)};t.Html.from=function(n){return new t.Html(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.html,n.hasEditor)};t.registerFactory("Html",function(n){return t.Html.from(n)})}(jQuery,LayoutEditor||(LayoutEditor={})); \ No newline at end of file +var LayoutEditor;(function(n){Array.prototype.move=function(n,t){this.splice(t,0,this.splice(n,1)[0])};n.childrenFrom=function(t){return _(t).map(function(t){return n.elementFrom(t)})};var t=n.registerFactory=function(t,i){var r=n.factories=n.factories||{};r[t]=i};t("Grid",function(t){return n.Grid.from(t)});t("Row",function(t){return n.Row.from(t)});t("Column",function(t){return n.Column.from(t)});t("Content",function(t){return n.Content.from(t)});n.elementFrom=function(t){var i=n.factories[t.type];if(!i)throw new Error('No element with type "'+t.type+'" was found.');return i(t)};n.setModel=function(n,t){$(n).scope().element=t};n.getModel=function(n){return $(n).scope().element}})(LayoutEditor||(LayoutEditor={})),function(n){n.Editor=function(t,i){this.config=t;this.canvas=n.Canvas.from(i);this.initialState=JSON.stringify(this.canvas.toObject());this.activeElement=null;this.focusedElement=null;this.dropTargetElement=null;this.isDragging=!1;this.inlineEditingIsActive=!1;this.isResizing=!1;this.resetToolboxElements=function(){this.toolboxElements=[n.Row.from({children:[]})]};this.isDirty=function(){var n=JSON.stringify(this.canvas.toObject());return this.initialState!=n};this.resetToolboxElements();this.canvas.setEditor(this)}}(LayoutEditor||(LayoutEditor={})),function(n){n.Element=function(n,t,i,r,u,f,e){if(!n)throw new Error("Parameter 'type' is required.");this.type=n;this.data=t;this.htmlId=i;this.htmlClass=r;this.htmlStyle=u;this.isTemplated=f;this.rule=e;this.editor=null;this.parent=null;this.setIsFocusedEventHandlers=[];this.setEditor=function(n){this.editor=n;!!this.children&&_.isArray(this.children)&&_(this.children).each(function(t){t.setEditor(n)})};this.setParent=function(n){this.parent=n;!this.parent.linkChild||this.parent.linkChild(this)};this.setIsTemplated=function(n){this.isTemplated=n;!!this.children&&_.isArray(this.children)&&_(this.children).each(function(t){t.setIsTemplated(n)})};this.getIsActive=function(){return this.editor?this.editor.activeElement===this&&!this.getIsFocused():!1};this.setIsActive=function(n){this.editor&&(this.editor.isDragging||this.editor.inlineEditingIsActive||this.editor.isResizing||(this.editor.activeElement=n?this:this.parent))};this.getIsFocused=function(){return this.editor?this.editor.focusedElement===this:!1};this.setIsFocused=function(){this.editor&&(this.isTemplated||this.editor.isDragging||this.editor.inlineEditingIsActive||this.editor.isResizing||(this.editor.focusedElement=this,_(this.setIsFocusedEventHandlers).each(function(n){try{n()}catch(t){}})))};this.getIsSelected=function(){return this.getIsFocused()?!0:!!this.children&&_.isArray(this.children)?_(this.children).any(function(n){return n.getIsSelected()}):!1};this.getIsDropTarget=function(){return this.editor?this.editor.dropTargetElement===this:!1};this.setIsDropTarget=function(n){this.editor&&(this.editor.dropTargetElement=n?this:null)};this.delete=function(){!this.parent||this.parent.deleteChild(this)};this.canMoveUp=function(){return this.parent?this.parent.canMoveChildUp(this):!1};this.moveUp=function(){!this.parent||this.parent.moveChildUp(this)};this.canMoveDown=function(){return this.parent?this.parent.canMoveChildDown(this):!1};this.moveDown=function(){!this.parent||this.parent.moveChildDown(this)};this.elementToObject=function(){return{type:this.type,data:this.data,htmlId:this.htmlId,htmlClass:this.htmlClass,htmlStyle:this.htmlStyle,isTemplated:this.isTemplated,rule:this.rule}};this.getEditorObject=function(){return{}};this.copy=function(n){var t=this.getInnerText(),i,r;n.setData("text/plain",t);console.log(t);i=this.toObject();r=JSON.stringify(i,null,"\t");n.setData("text/json",r)};this.cut=function(n){this.copy(n);this.delete()};this.paste=function(n){!this.parent||this.parent.paste(n)}}}(LayoutEditor||(LayoutEditor={})),function(n){n.Container=function(t,i){this.allowedChildTypes=t;this.children=i;this.isContainer=!0;var r=this;this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=r})};this.setChildren(i);this.getIsSealed=function(){return _(this.children).any(function(n){return n.isTemplated})};this.addChild=function(n){!_(this.children).contains(n)&&(_(this.allowedChildTypes).contains(n.type)||n.isContainable)&&this.children.push(n);n.setEditor(this.editor);n.setIsTemplated(!1);n.parent=this};this.deleteChild=function(n){var t=_(this.children).indexOf(n);t>=0&&(this.children.splice(t,1),n.getIsActive()&&(this.editor.activeElement=null),n.getIsFocused()&&(this.children.length>t?this.children[t].setIsFocused():t>0?this.children[t-1].setIsFocused():this.setIsFocused()))};this.moveFocusPrevChild=function(n){if(!(this.children.length<2)){var t=_(this.children).indexOf(n);t>0&&this.children[t-1].setIsFocused()}};this.moveFocusNextChild=function(n){if(!(this.children.length<2)){var t=_(this.children).indexOf(n);t0};this.canMoveChildDown=function(n){var t=_(this.children).indexOf(n);return t0?n.width<12:t<0?n.width>1:!1}var t,f,r,u;if(n==0)return!0;for(t=n,t<0&&(f=12-a(),t+=f,t>0&&(t=0));t<0&&_(h.children).any(function(n){return n.offset>0});)for(i=0;i0&&(r.offset--,t++);while(t!=0){if(!_(h.children).any(e))break;for(i=0;i=0?n.width>1:!1};this.contractColumnRight=function(n,t){var i,r;this.canContractColumnRight(n,t)&&(i=_(this.children).indexOf(n),i>=0&&n.width>1&&(n.width--,this.children.length>i+1&&(r=this.children[i+1],t&&r.offset==0?r.width++:r.offset++)))};this.canExpandColumnRight=function(n,t){var r=_(this.children).indexOf(n),i;return r>=0?n.width>=12?!1:this.children.length>r+1?(i=this.children[r+1],t&&i.offset==0?i.width>1:i.offset>0):a()<12:!1};this.expandColumnRight=function(n,t){var i,r;this.canExpandColumnRight(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(this.children.length>i+1&&(r=this.children[i+1],t&&r.offset==0?r.width--:r.offset--),n.width++))};this.canExpandColumnLeft=function(n,t){var i=_(this.children).indexOf(n),r;return i>=0?n.width>=12?!1:i>0&&(r=this.children[i-1],t&&n.offset==0)?r.width>1:n.offset>0:!1};this.expandColumnLeft=function(n,t){var i,r;this.canExpandColumnLeft(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(i>0?(r=this.children[i-1],t&&n.offset==0?r.width--:n.offset--):n.offset--,n.width++))};this.canContractColumnLeft=function(n){var t=_(this.children).indexOf(n);return t>=0?n.width>1:!1};this.contractColumnLeft=function(n,t){var i,r;this.canContractColumnLeft(n,t)&&(i=_(this.children).indexOf(n),i>=0&&(i>0?(r=this.children[i-1],t&&n.offset==0?r.width++:n.offset++):n.offset++,n.width--))};this.evenColumns=function(){var t,n;this.children.length!=0&&(t=Math.floor(12/this.children.length),_(this.children).each(function(n){n.width=t;n.offset=0}),n=12%this.children.length,n>0&&l(n))};y=this.pasteChild;this.pasteChild=function(n){n.type=="Column"?this.beginAddColumn(n.width)&&(this.commitAddColumn(),y.call(this,n)):!this.parent||this.parent.pasteChild(n)};this.toObject=function(){var n=this.elementToObject();return n.children=this.childrenToObject(),n}};n.Row.from=function(t){var i=new n.Row(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,t.rule,n.childrenFrom(t.children));return i.toolboxIcon=t.toolboxIcon,i.toolboxLabel=t.toolboxLabel,i.toolboxDescription=t.toolboxDescription,i}}(LayoutEditor||(LayoutEditor={})),function(n){n.Column=function(t,i,r,u,f,e,o,s,h,c,l){n.Element.call(this,"Column",t,i,r,u,f,c);n.Container.call(this,["Grid","Content"],l);this.width=e;this.offset=o;this.zoneName=s;this.collapsible=h;var a=!1,v=0,y=0;this.beginChange=function(){if(!!a)throw new Error("Column already has a pending change.");a=!0;v=this.width;y=this.offset};this.commitChange=function(){if(!a)throw new Error("Column has no pending change.");v=0;y=0;a=!1};this.rollbackChange=function(){if(!a)throw new Error("Column has no pending change.");this.width=v;this.offset=y;v=0;y=0;a=!1};this.canSplit=function(){return this.width>1};this.split=function(){if(this.canSplit()){var t=Math.floor(this.width/2),i=n.Column.from({data:null,htmlId:null,htmlClass:null,htmlStyle:null,width:t,offset:0,children:[]});this.width=this.width-t;this.parent.insertChild(i,this);i.setIsFocused()}};this.canContractRight=function(n){return this.parent.canContractColumnRight(this,n)};this.contractRight=function(n){this.parent.contractColumnRight(this,n)};this.canExpandRight=function(n){return this.parent.canExpandColumnRight(this,n)};this.expandRight=function(n){this.parent.expandColumnRight(this,n)};this.canExpandLeft=function(n){return this.parent.canExpandColumnLeft(this,n)};this.expandLeft=function(n){this.parent.expandColumnLeft(this,n)};this.canContractLeft=function(n){return this.parent.canContractColumnLeft(this,n)};this.contractLeft=function(n){this.parent.contractColumnLeft(this,n)};this.toObject=function(){var n=this.elementToObject();return n.width=this.width,n.offset=this.offset,n.zoneName=this.zoneName,n.collapsible=this.collapsible,n.children=this.childrenToObject(),n}};n.Column.from=function(t){var i=new n.Column(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,t.width,t.offset,t.zoneName,t.collapsible,t.rule,n.childrenFrom(t.children));return i.toolboxIcon=t.toolboxIcon,i.toolboxLabel=t.toolboxLabel,i.toolboxDescription=t.toolboxDescription,i};n.Column.times=function(t){return _.times(t,function(){return n.Column.from({data:null,htmlId:null,htmlClass:null,isTemplated:!1,width:12/t,offset:0,zoneName:null,collapsible:null,children:[]})})}}(LayoutEditor||(LayoutEditor={})),function(n){n.Content=function(t,i,r,u,f,e,o,s,h,c,l){n.Element.call(this,"Content",t,i,r,u,f,l);this.contentType=e;this.contentTypeLabel=o;this.contentTypeClass=s;this.html=h;this.hasEditor=c;this.getInnerText=function(){return $($.parseHTML("
"+this.html+"<\/div>")).text()};this.setHtml=function(n){this.html=n;this.htmlUnsafe=n};this.toObject=function(){return{type:"Content"}};this.toObject=function(){var n=this.elementToObject();return n.contentType=this.contentType,n.contentTypeLabel=this.contentTypeLabel,n.contentTypeClass=this.contentTypeClass,n.html=this.html,n.hasEditor=c,n};this.setHtml(h)};n.Content.from=function(t){return new n.Content(t.data,t.htmlId,t.htmlClass,t.htmlStyle,t.isTemplated,t.contentType,t.contentTypeLabel,t.contentTypeClass,t.html,t.hasEditor,t.rule)}}(LayoutEditor||(LayoutEditor={})),function(n,t){t.Html=function(i,r,u,f,e,o,s,h,c,l,a){t.Element.call(this,"Html",i,r,u,f,e,a);this.contentType=o;this.contentTypeLabel=s;this.contentTypeClass=h;this.html=c;this.hasEditor=l;this.isContainable=!0;this.getInnerText=function(){return n(n.parseHTML("
"+this.html+"<\/div>")).text()};this.setHtml=function(n){this.html=n;this.htmlUnsafe=n};this.toObject=function(){return{type:"Html"}};this.toObject=function(){var n=this.elementToObject();return n.contentType=this.contentType,n.contentTypeLabel=this.contentTypeLabel,n.contentTypeClass=this.contentTypeClass,n.html=this.html,n.hasEditor=l,n};var v=this.getEditorObject;this.getEditorObject=function(){var t=v();return n.extend(t,{Content:this.html})};this.setHtml(c)};t.Html.from=function(n){return new t.Html(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.html,n.hasEditor,n.rule)};t.registerFactory("Html",function(n){return t.Html.from(n)})}(jQuery,LayoutEditor||(LayoutEditor={})); \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Canvas.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Canvas.js index c92cef845..b92146e9d 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Canvas.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Canvas.js @@ -1,8 +1,8 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); this.toObject = function () { @@ -19,6 +19,7 @@ value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Column.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Column.js index c280e1bdb..5bdf51acb 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Column.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Column.js @@ -1,7 +1,7 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, zoneName, collapsible, children) { - LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, zoneName, collapsible, rule, children) { + LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Grid", "Content"], children); this.width = width; @@ -117,6 +117,7 @@ value.offset, value.zoneName, value.collapsible, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Content.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Content.js index a6f921994..15a974b9d 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Content.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Content.js @@ -1,8 +1,8 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Content = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor) { - LayoutEditor.Element.call(this, "Content", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Content = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor, rule) { + LayoutEditor.Element.call(this, "Content", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); this.contentType = contentType; this.contentTypeLabel = contentTypeLabel; @@ -50,7 +50,8 @@ value.contentTypeLabel, value.contentTypeClass, value.html, - value.hasEditor); + value.hasEditor, + value.rule); return result; }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Element.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Element.js index bff13edd9..fca57d22e 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Element.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Element.js @@ -1,7 +1,7 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Element = function (type, data, htmlId, htmlClass, htmlStyle, isTemplated) { + LayoutEditor.Element = function (type, data, htmlId, htmlClass, htmlStyle, isTemplated, rule) { if (!type) throw new Error("Parameter 'type' is required."); @@ -11,6 +11,7 @@ this.htmlClass = htmlClass; this.htmlStyle = htmlStyle; this.isTemplated = isTemplated; + this.rule = rule; this.editor = null; this.parent = null; @@ -146,7 +147,8 @@ htmlId: this.htmlId, htmlClass: this.htmlClass, htmlStyle: this.htmlStyle, - isTemplated: this.isTemplated + isTemplated: this.isTemplated, + rule: this.rule }; }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Grid.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Grid.js index 392858f48..124e818ad 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Grid.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Grid.js @@ -1,8 +1,8 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Grid = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Grid", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Grid = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Grid", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Row"], children); this.toObject = function () { @@ -19,6 +19,7 @@ value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Html.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Html.js index a15f5bee8..fd62a1b3e 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Html.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Html.js @@ -1,8 +1,8 @@ var LayoutEditor; (function ($, LayoutEditor) { - LayoutEditor.Html = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor) { - LayoutEditor.Element.call(this, "Html", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Html = function (data, htmlId, htmlClass, htmlStyle, isTemplated, contentType, contentTypeLabel, contentTypeClass, html, hasEditor, rule) { + LayoutEditor.Element.call(this, "Html", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); this.contentType = contentType; this.contentTypeLabel = contentTypeLabel; @@ -59,7 +59,8 @@ value.contentTypeLabel, value.contentTypeClass, value.html, - value.hasEditor); + value.hasEditor, + value.rule); return result; }; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Row.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Row.js index d7b7100ed..89f6239c1 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Row.js +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models/Row.js @@ -1,8 +1,8 @@ var LayoutEditor; (function (LayoutEditor) { - LayoutEditor.Row = function (data, htmlId, htmlClass, htmlStyle, isTemplated, children) { - LayoutEditor.Element.call(this, "Row", data, htmlId, htmlClass, htmlStyle, isTemplated); + LayoutEditor.Row = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) { + LayoutEditor.Element.call(this, "Row", data, htmlId, htmlClass, htmlStyle, isTemplated, rule); LayoutEditor.Container.call(this, ["Column"], children); var _self = this; @@ -275,6 +275,7 @@ value.htmlClass, value.htmlStyle, value.isTemplated, + value.rule, LayoutEditor.childrenFrom(value.children)); result.toolboxIcon = value.toolboxIcon; result.toolboxLabel = value.toolboxLabel; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Services/DefaultModelMaps.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Services/DefaultModelMaps.cs index 819adf52c..ca532d6c9 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Services/DefaultModelMaps.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Services/DefaultModelMaps.cs @@ -36,6 +36,7 @@ namespace Orchard.Layouts.Services { node["htmlClass"] = element.HtmlClass; node["htmlStyle"] = element.HtmlStyle; node["isTemplated"] = element.IsTemplated; + node["rule"] = element.Rule; } protected virtual void ToElement(T element, JToken node) { @@ -44,6 +45,7 @@ namespace Orchard.Layouts.Services { element.HtmlClass = (string)node["htmlClass"]; element.HtmlStyle = (string)node["htmlStyle"]; element.IsTemplated = (bool)(node["isTemplated"] ?? false); + element.Rule = (string) node["rule"]; } protected bool? ReadBoolean(JToken node) { @@ -113,6 +115,7 @@ namespace Orchard.Layouts.Services { element.HtmlClass = (string)node["htmlClass"]; element.HtmlStyle = (string)node["htmlStyle"]; element.IsTemplated = (bool)(node["isTemplated"] ?? false); + element.Rule = (string) node["rule"]; return element; } @@ -122,6 +125,7 @@ namespace Orchard.Layouts.Services { node["htmlId"] = element.HtmlId; node["htmlClass"] = element.HtmlClass; node["htmlStyle"] = element.HtmlStyle; + node["rule"] = element.Rule; node["isTemplated"] = element.IsTemplated; node["hasEditor"] = element.HasEditor; node["contentType"] = element.Descriptor.TypeName; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementEventHandlerBase.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementEventHandlerBase.cs index f0a7df52f..b84fb2049 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementEventHandlerBase.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementEventHandlerBase.cs @@ -5,6 +5,7 @@ namespace Orchard.Layouts.Services { public abstract class ElementEventHandlerBase : Component, IElementEventHandler { public virtual void Creating(ElementCreatingContext context) { } public virtual void Created(ElementCreatedContext context) { } + public virtual void CreatingDisplay(ElementCreatingDisplayShapeContext context) {} public virtual void Displaying(ElementDisplayingContext context) { } public virtual void Displayed(ElementDisplayedContext context) { } public virtual void BuildEditor(ElementEditorContext context) { } diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementSerializer.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementSerializer.cs index b912290fa..01cdbc82e 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementSerializer.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Services/ElementSerializer.cs @@ -22,7 +22,7 @@ namespace Orchard.Layouts.Services { return null; var token = JToken.Parse(data); - var element = ParseNode(node: token, parent: null, index: 0, describeContext: describeContext); + var element = ParseNode(node: token, parent: null, index: 0, describeContext: describeContext); return element; } @@ -43,7 +43,8 @@ namespace Orchard.Layouts.Services { isTemplated = element.IsTemplated, htmlId = element.HtmlId, htmlClass = element.HtmlClass, - htmlStyle = element.HtmlStyle + htmlStyle = element.HtmlStyle, + rule = element.Rule }; return dto; } @@ -54,10 +55,11 @@ namespace Orchard.Layouts.Services { if (String.IsNullOrWhiteSpace(elementTypeName)) return null; - var data = (string) node["data"]; - var htmlId = (string) node["htmlId"]; + var data = (string)node["data"]; + var htmlId = (string)node["htmlId"]; var htmlClass = (string)node["htmlClass"]; var htmlStyle = (string)node["htmlStyle"]; + var rule = (string)node["rule"]; var elementData = ElementDataHelper.Deserialize(data); var exportableData = ElementDataHelper.Deserialize((string)node["exportableData"]); var childNodes = node["elements"]; @@ -68,19 +70,20 @@ namespace Orchard.Layouts.Services { var element = _elementFactory.Activate(elementDescriptor, e => { e.Container = parent; - e.Index = index; - e.Data = elementData; - e.ExportableData = exportableData; - e.HtmlId = htmlId; - e.HtmlClass = htmlClass; - e.HtmlStyle = htmlStyle; + e.Index = index; + e.Data = elementData; + e.ExportableData = exportableData; + e.HtmlId = htmlId; + e.HtmlClass = htmlClass; + e.HtmlStyle = htmlStyle; + e.Rule = rule; }); var container = element as Container; if (container != null) - container.Elements = childNodes != null - ? childNodes.Select((x, i) => ParseNode(x, container, i, describeContext)).Where(x => x != null).ToList() + container.Elements = childNodes != null + ? childNodes.Select((x, i) => ParseNode(x, container, i, describeContext)).Where(x => x != null).ToList() : new List(); element.IsTemplated = node.Value("isTemplated"); diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Services/IElementEventHandler.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Services/IElementEventHandler.cs index 077948241..6ba089a94 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Services/IElementEventHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Services/IElementEventHandler.cs @@ -6,6 +6,7 @@ namespace Orchard.Layouts.Services { public interface IElementEventHandler : IEventHandler { void Creating(ElementCreatingContext context); void Created(ElementCreatedContext context); + void CreatingDisplay(ElementCreatingDisplayShapeContext context); void Displaying(ElementDisplayingContext context); void Displayed(ElementDisplayedContext context); void BuildEditor(ElementEditorContext context); diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css index 7f450efae..038256e25 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css @@ -757,6 +757,10 @@ table[rules=all i] > tfoot > tr > td, table[rules=all i] > tfoot > tr > th { cursor: default; white-space: nowrap; line-height: normal; + width: 300px; +} +.layout-editor .layout-popup.wide { + width: 600px; } .layout-editor .layout-popup .layout-popup-flex { display: flex; @@ -779,6 +783,10 @@ table[rules=all i] > tfoot > tr > td, table[rules=all i] > tfoot > tr > th { background-color: #f3f4f5; cursor: pointer; } +.layout-editor .layout-popup .layout-popup-input input, +.layout-editor .layout-popup .layout-popup-input textarea { + width: 100%; +} .layout-editor .layout-popup .layout-popup-input > label { display: block; font-size: 0.9em; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css index 27ea3f524..e65425607 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css @@ -1 +1 @@ -.layout-editor{display:flex;margin-top:1em;font-size:14px;align-items:flex-start}.layout-editor>.layout-canvas-wrapper{flex-grow:1;background-color:#f3f4f5;border:1px solid #e4e5e6}.layout-editor>.layout-canvas-wrapper>.layout-toolbar-container{display:none;margin:12px 12px 0;min-height:71px}.layout-editor>.layout-canvas-wrapper>.layout-toolbar-container>.mce-panel{width:100% !important}.layout-editor .layout-element{position:relative;margin-top:0;margin-right:0;margin-bottom:0;padding:0}.layout-editor .layout-element:not(.layout-column){margin-left:0}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel{display:none;position:absolute;margin:0;z-index:20;height:25px;padding:0 6px;list-style:none;white-space:nowrap;line-height:25px;vertical-align:middle}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-item{display:inline-block;height:25px;padding:1px 6px 0}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-label{font-size:13px}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-action{display:none;width:28px;cursor:pointer;text-align:center}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel-main{top:-27px;left:-2px}.layout-editor li.layout-element{list-style:none}.layout-editor:not(.layout-editor-dragging) .layout-element-active,.layout-editor:not(.layout-editor-dragging) .layout-element-focused{border-width:2px;border-style:solid}.layout-editor:not(.layout-editor-dragging) .layout-element-active>.layout-element-wrapper,.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper{margin:-2px}.layout-editor:not(.layout-editor-dragging) .layout-element-active{border-color:rgba(104,104,104,.1)}.layout-editor:not(.layout-editor-dragging) .layout-element-active>.layout-element-wrapper>.layout-panel-main{display:block;z-index:30;background-color:rgba(104,104,104,.1)}.layout-editor:not(.layout-editor-dragging) .layout-element-focused{border-color:#648721}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel{display:block;background-color:#648721;color:#fefefe}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action{display:inline-block}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action:hover{background-color:#82b02b}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.disabled{cursor:default;color:rgba(254,254,254,.4)}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.disabled:hover{background-color:#648721}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.active{color:#deff42;background-color:#739b26}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.active:hover{background-color:#82b02b}.layout-editor:not(.layout-editor-dragging) .layout-element-selected{background-color:rgba(100,135,33,.08)}.layout-editor .ui-sortable-placeholder{display:none}.layout-editor .layout-element-droptarget{box-shadow:inset 0 0 12px 6px rgba(100,135,33,.5)}.layout-editor .layout-element-droptarget .ui-sortable-placeholder{display:block;visibility:visible !important;min-height:78px;border:2px dashed #648721 !important;background-color:rgba(100,135,33,.16)}.layout-editor .media-thumbnail img{max-width:100%;max-height:100%}.layout-editor .layout-container>.layout-element-wrapper>.layout-container-children-placeholder{display:none;flex-direction:column;margin:11px;min-height:80px;border:1px dashed rgba(124,124,124,.4);border-radius:4px;padding:12px;justify-content:center;font-size:13px;font-style:italic;opacity:.6;text-align:center}.layout-editor .layout-container>.layout-element-wrapper>.layout-children{padding:12px}.layout-editor .layout-container>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-container)+.layout-element:not(.layout-container){margin-top:12px}.layout-editor .layout-container>.layout-element-wrapper>.layout-children>.ui-sortable-helper:first-child+.layout-element:not(.layout-container){margin-top:0}.layout-editor .layout-container>.layout-element-wrapper.layout-container-empty>.layout-container-children-placeholder{display:flex}.layout-editor .layout-container>.layout-element-wrapper.layout-container-empty>.layout-children{position:absolute;top:0;right:0;bottom:0;left:0}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active){border:1px dashed rgba(124,124,124,.6)}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin:-1px}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-container+.layout-container:not(.layout-element-active){border-top:0}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-container+.layout-container:not(.layout-element-active)>.layout-element-wrapper{margin-top:0}.layout-editor .layout-canvas #dummy{display:none}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active){border-top:1px dashed rgba(124,124,124,.6) !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin-top:-1px !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element+.layout-element:not(.layout-element-active){border-left:0 !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element+.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin-left:0 !important}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar{display:none;position:absolute;z-index:30;top:0;width:16px;height:100%;cursor:col-resize}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar-left{left:-6px}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar-right{right:-6px}.layout-editor .layout-column.layout-element-focused>.layout-element-wrapper>.layout-column-resize-bar{display:block}.layout-editor .layout-content{min-height:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup{padding:2px;overflow-x:hidden;line-height:normal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup *{margin:0;padding:0;box-sizing:content-box}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup address,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup center,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup div,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figcaption,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup footer,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup form,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup header,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup legend,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup p,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup p,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{margin-top:1em;margin-bottom:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure{margin-left:40px;margin-right:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup address{font-style:italic}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{font-family:monospace;white-space:pre}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup cite,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dfn,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup em,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup i,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup var{font-style:italic}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup b,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup strong{font-weight:bolder}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup code,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup kbd,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup samp,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tt{font-family:monospace}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup big{font-size:larger}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup small{font-size:smaller}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sub{vertical-align:sub}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sup{vertical-align:super}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sub,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sup{line-height:normal;font-size:smaller}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ruby{display:ruby}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rb{display:ruby-base;white-space:nowrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rt{display:ruby-text;white-space:nowrap;font-size:50%;font-variant-east-asian:ruby;text-emphasis:none}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rbc{display:ruby-base-container}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rtc{display:ruby-text-container}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ruby,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rb,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rt,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rbc,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rtc{unicode-bidi:isolate}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :link{color:#00e}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :visited{color:#551a8b}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :link,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :visited{text-decoration:underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup a:link[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup a:visited[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup area:link[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup area:visited[rel~=help]{cursor:help}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :focus{outline:auto}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup mark{background:#ff0;color:#000}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup abbr[title],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup acronym[title]{text-decoration:dotted underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ins,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup u{text-decoration:underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup del,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup s,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup strike{text-decoration:line-through}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blink{text-decoration:blink}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup q::before{content:open-quote}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup q::after{content:close-quote}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup br{content:'\a';white-space:pre}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nobr{white-space:nowrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup wbr{content:'​'}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nobr wbr{white-space:normal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup article,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup aside,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h1,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h2,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h3,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h4,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h5,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h6,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nav,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup section{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h1{margin-top:.67em;margin-bottom:.67em;font-size:2em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h2{margin-top:.83em;margin-bottom:.83em;font-size:1.5em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h3{margin-top:1em;margin-bottom:1em;font-size:1.17em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h4{margin-top:1.33em;margin-bottom:1.33em;font-size:1em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h5{margin-top:1.67em;margin-bottom:1.67em;font-size:.83em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h6{margin-top:2.33em;margin-bottom:2.33em;font-size:.67em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dd,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dt,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup li{display:list-item}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{margin-top:1em;margin-bottom:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul{margin-top:0;margin-bottom:0}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dd{margin-left:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{padding-left:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol{list-style-type:decimal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{list-style-type:disc}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul{list-style-type:circle}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul ul{list-style-type:square}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table{display:table}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup caption{display:table-caption}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup[hidden]{display:table-column-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col[hidden]{display:table-column}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead[hidden]{display:table-header-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody[hidden]{display:table-row-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot[hidden]{display:table-footer-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr[hidden]{display:table-row}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th[hidden]{display:table-cell}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th[hidden]{visibility:collapse}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table{box-sizing:border-box;border-spacing:2px;border-collapse:separate;text-indent:initial}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{padding:1px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table>tr{vertical-align:middle}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{vertical-align:inherit}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{border-color:gray}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr{border-color:inherit}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup select,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup option,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup optgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup textarea,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup keygen{text-indent:initial}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup textarea{white-space:pre-wrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="radio"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="checkbox"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="reset"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="button"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="submit"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup select,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button{box-sizing:border-box}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="button"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button{padding:.3em .5em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hr{color:gray;border-style:inset;border-width:1px;margin:.5em auto}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup fieldset{margin-left:2px;margin-right:2px;border:groove 2px ThreeDFace;padding:.35em .625em .75em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup legend{padding-left:2px;padding-right:2px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>*:first-child{margin-top:0 !important}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>*:last-child{margin-bottom:0 !important}.layout-editor .layout-content.layout-content-image>.layout-element-wrapper>.layout-content-markup>img,.layout-editor .layout-content.layout-content-vector-image>.layout-element-wrapper>.layout-content-markup>img{display:block;width:100%;max-width:100%;height:auto}.layout-editor .img-responsive,.layout-editor .img-responsive img{display:block;width:100%;max-width:100%;height:auto}.layout-editor>.layout-toolbox{margin-left:12px;border:1px solid #e4e5e6;width:220px;flex-shrink:0;min-height:400px;padding:6px;background-color:#f3f4f5}.layout-editor>.layout-toolbox .layout-toolbox-group{margin-top:12px}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-group-heading{display:block;margin-bottom:4px;text-decoration:none}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-group-heading:before{display:inline-block;width:10px;margin-right:4px;font:normal normal normal 14px/1 FontAwesome;text-align:center;content:""}.layout-editor>.layout-toolbox .layout-toolbox-group.collapsed .layout-toolbox-group-heading:before{content:""}.layout-editor>.layout-toolbox .layout-toolbox-group.collapsed .layout-toolbox-items{display:none}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-section+.layout-toolbox-section{margin-top:4px}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item{border:1px solid #e4e5e6;background-color:#fff;padding:9px 12px;cursor:default}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item i{display:inline-block;width:16px;font:normal normal normal 14px/1 FontAwesome}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item+.layout-toolbox-item{margin-top:4px}.layout-editor>.layout-toolbox .layout-toolbox-group+.layout-toolbox-group{margin-top:6px}.layout-editor .layout-popup{display:none;position:absolute;margin:0;-moz-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);-webkit-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);border:1px solid #e4e5e6;padding:2px 0;background-color:#f7f7f7;list-style:none;z-index:20;color:#7c7c7c;text-align:left;cursor:default;white-space:nowrap;line-height:normal}.layout-editor .layout-popup .layout-popup-flex{display:flex;padding:2px 5px}.layout-editor .layout-popup .layout-popup-flex .layout-popup-column+.layout-popup-column{margin-left:4px;border-left:1px solid rgba(128,128,128,.15);padding-left:4px}.layout-editor .layout-popup .layout-popup-item{padding:4px 6px}.layout-editor .layout-popup .layout-popup-label{font-size:.9em;font-weight:bold;color:#7c7c7c}.layout-editor .layout-popup .layout-popup-action:hover{background-color:#f3f4f5;cursor:pointer}.layout-editor .layout-popup .layout-popup-input>label{display:block;font-size:.9em} \ No newline at end of file +.layout-editor{display:flex;margin-top:1em;font-size:14px;align-items:flex-start}.layout-editor>.layout-canvas-wrapper{flex-grow:1;background-color:#f3f4f5;border:1px solid #e4e5e6}.layout-editor>.layout-canvas-wrapper>.layout-toolbar-container{display:none;margin:12px 12px 0;min-height:71px}.layout-editor>.layout-canvas-wrapper>.layout-toolbar-container>.mce-panel{width:100% !important}.layout-editor .layout-element{position:relative;margin-top:0;margin-right:0;margin-bottom:0;padding:0}.layout-editor .layout-element:not(.layout-column){margin-left:0}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel{display:none;position:absolute;margin:0;z-index:20;height:25px;padding:0 6px;list-style:none;white-space:nowrap;line-height:25px;vertical-align:middle}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-item{display:inline-block;height:25px;padding:1px 6px 0}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-label{font-size:13px}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel>.layout-panel-action{display:none;width:28px;cursor:pointer;text-align:center}.layout-editor .layout-element>.layout-element-wrapper>.layout-panel-main{top:-27px;left:-2px}.layout-editor li.layout-element{list-style:none}.layout-editor:not(.layout-editor-dragging) .layout-element-active,.layout-editor:not(.layout-editor-dragging) .layout-element-focused{border-width:2px;border-style:solid}.layout-editor:not(.layout-editor-dragging) .layout-element-active>.layout-element-wrapper,.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper{margin:-2px}.layout-editor:not(.layout-editor-dragging) .layout-element-active{border-color:rgba(104,104,104,.1)}.layout-editor:not(.layout-editor-dragging) .layout-element-active>.layout-element-wrapper>.layout-panel-main{display:block;z-index:30;background-color:rgba(104,104,104,.1)}.layout-editor:not(.layout-editor-dragging) .layout-element-focused{border-color:#648721}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel{display:block;background-color:#648721;color:#fefefe}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action{display:inline-block}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action:hover{background-color:#82b02b}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.disabled{cursor:default;color:rgba(254,254,254,.4)}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.disabled:hover{background-color:#648721}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.active{color:#deff42;background-color:#739b26}.layout-editor:not(.layout-editor-dragging) .layout-element-focused>.layout-element-wrapper>.layout-panel>.layout-panel-action.active:hover{background-color:#82b02b}.layout-editor:not(.layout-editor-dragging) .layout-element-selected{background-color:rgba(100,135,33,.08)}.layout-editor .ui-sortable-placeholder{display:none}.layout-editor .layout-element-droptarget{box-shadow:inset 0 0 12px 6px rgba(100,135,33,.5)}.layout-editor .layout-element-droptarget .ui-sortable-placeholder{display:block;visibility:visible !important;min-height:78px;border:2px dashed #648721 !important;background-color:rgba(100,135,33,.16)}.layout-editor .media-thumbnail img{max-width:100%;max-height:100%}.layout-editor .layout-container>.layout-element-wrapper>.layout-container-children-placeholder{display:none;flex-direction:column;margin:11px;min-height:80px;border:1px dashed rgba(124,124,124,.4);border-radius:4px;padding:12px;justify-content:center;font-size:13px;font-style:italic;opacity:.6;text-align:center}.layout-editor .layout-container>.layout-element-wrapper>.layout-children{padding:12px}.layout-editor .layout-container>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-container)+.layout-element:not(.layout-container){margin-top:12px}.layout-editor .layout-container>.layout-element-wrapper>.layout-children>.ui-sortable-helper:first-child+.layout-element:not(.layout-container){margin-top:0}.layout-editor .layout-container>.layout-element-wrapper.layout-container-empty>.layout-container-children-placeholder{display:flex}.layout-editor .layout-container>.layout-element-wrapper.layout-container-empty>.layout-children{position:absolute;top:0;right:0;bottom:0;left:0}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active){border:1px dashed rgba(124,124,124,.6)}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin:-1px}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-container+.layout-container:not(.layout-element-active){border-top:0}.layout-editor:not(.layout-editor-dragging) .layout-container.layout-element-focused>.layout-element-wrapper>.layout-children>.layout-container+.layout-container:not(.layout-element-active)>.layout-element-wrapper{margin-top:0}.layout-editor .layout-canvas #dummy{display:none}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active){border-top:1px dashed rgba(124,124,124,.6) !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin-top:-1px !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element+.layout-element:not(.layout-element-active){border-left:0 !important}.layout-editor .layout-row.layout-element-focused:not(.layout-element-droptarget)>.layout-element-wrapper>.layout-children>.layout-element+.layout-element:not(.layout-element-active)>.layout-element-wrapper{margin-left:0 !important}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar{display:none;position:absolute;z-index:30;top:0;width:16px;height:100%;cursor:col-resize}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar-left{left:-6px}.layout-editor .layout-column>.layout-element-wrapper>.layout-column-resize-bar-right{right:-6px}.layout-editor .layout-column.layout-element-focused>.layout-element-wrapper>.layout-column-resize-bar{display:block}.layout-editor .layout-content{min-height:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup{padding:2px;overflow-x:hidden;line-height:normal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup *{margin:0;padding:0;box-sizing:content-box}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup address,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup center,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup div,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figcaption,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup footer,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup form,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup header,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup legend,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup p,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup p,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{margin-top:1em;margin-bottom:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blockquote,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup figure{margin-left:40px;margin-right:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup address{font-style:italic}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup listing,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup plaintext,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup pre,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup xmp{font-family:monospace;white-space:pre}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup cite,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dfn,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup em,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup i,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup var{font-style:italic}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup b,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup strong{font-weight:bolder}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup code,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup kbd,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup samp,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tt{font-family:monospace}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup big{font-size:larger}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup small{font-size:smaller}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sub{vertical-align:sub}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sup{vertical-align:super}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sub,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup sup{line-height:normal;font-size:smaller}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ruby{display:ruby}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rb{display:ruby-base;white-space:nowrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rt{display:ruby-text;white-space:nowrap;font-size:50%;font-variant-east-asian:ruby;text-emphasis:none}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rbc{display:ruby-base-container}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rtc{display:ruby-text-container}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ruby,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rb,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rt,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rbc,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup rtc{unicode-bidi:isolate}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :link{color:#00e}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :visited{color:#551a8b}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :link,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :visited{text-decoration:underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup a:link[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup a:visited[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup area:link[rel~=help],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup area:visited[rel~=help]{cursor:help}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup :focus{outline:auto}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup mark{background:#ff0;color:#000}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup abbr[title],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup acronym[title]{text-decoration:dotted underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ins,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup u{text-decoration:underline}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup del,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup s,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup strike{text-decoration:line-through}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup blink{text-decoration:blink}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup q::before{content:open-quote}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup q::after{content:close-quote}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup br{content:'\a';white-space:pre}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nobr{white-space:nowrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup wbr{content:'​'}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nobr wbr{white-space:normal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup article,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup aside,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h1,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h2,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h3,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h4,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h5,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h6,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup nav,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup section{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h1{margin-top:.67em;margin-bottom:.67em;font-size:2em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h2{margin-top:.83em;margin-bottom:.83em;font-size:1.5em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h3{margin-top:1em;margin-bottom:1em;font-size:1.17em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h4{margin-top:1.33em;margin-bottom:1.33em;font-size:1em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h5{margin-top:1.67em;margin-bottom:1.67em;font-size:.83em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup h6{margin-top:2.33em;margin-bottom:2.33em;font-size:.67em;font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dd,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dt,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{display:block}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup li{display:list-item}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{margin-top:1em;margin-bottom:1em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dl ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dl,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul{margin-top:0;margin-bottom:0}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dd{margin-left:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{padding-left:40px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol{list-style-type:decimal}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul{list-style-type:disc}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul{list-style-type:circle}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup dir ul ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ol ul ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul dir ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ol ul,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul dir,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup ul ul ul{list-style-type:square}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table{display:table}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup caption{display:table-caption}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup[hidden]{display:table-column-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col[hidden]{display:table-column}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead[hidden]{display:table-header-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody[hidden]{display:table-row-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot[hidden]{display:table-footer-group}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr[hidden]{display:table-row}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th[hidden]{display:table-cell}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup colgroup[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup col[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td[hidden],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th[hidden]{visibility:collapse}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table{box-sizing:border-box;border-spacing:2px;border-collapse:separate;text-indent:initial}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{padding:1px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{font-weight:bold}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table>tr{vertical-align:middle}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{vertical-align:inherit}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup table,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup td,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup th{border-color:gray}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup thead,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tbody,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tfoot,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup tr{border-color:inherit}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup select,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup option,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup optgroup,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup textarea,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup keygen{text-indent:initial}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup textarea{white-space:pre-wrap}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="radio"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="checkbox"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="reset"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="button"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="submit"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup select,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button{box-sizing:border-box}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup input[type="button"],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup button{padding:.3em .5em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup hr{color:gray;border-style:inset;border-width:1px;margin:.5em auto}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup fieldset{margin-left:2px;margin-right:2px;border:groove 2px ThreeDFace;padding:.35em .625em .75em}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup legend{padding-left:2px;padding-right:2px}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>*:first-child{margin-top:0 !important}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>*:last-child{margin-bottom:0 !important}.layout-editor .layout-content.layout-content-image>.layout-element-wrapper>.layout-content-markup>img,.layout-editor .layout-content.layout-content-vector-image>.layout-element-wrapper>.layout-content-markup>img{display:block;width:100%;max-width:100%;height:auto}.layout-editor .img-responsive,.layout-editor .img-responsive img{display:block;width:100%;max-width:100%;height:auto}.layout-editor>.layout-toolbox{margin-left:12px;border:1px solid #e4e5e6;width:220px;flex-shrink:0;min-height:400px;padding:6px;background-color:#f3f4f5}.layout-editor>.layout-toolbox .layout-toolbox-group{margin-top:12px}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-group-heading{display:block;margin-bottom:4px;text-decoration:none}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-group-heading:before{display:inline-block;width:10px;margin-right:4px;font:normal normal normal 14px/1 FontAwesome;text-align:center;content:""}.layout-editor>.layout-toolbox .layout-toolbox-group.collapsed .layout-toolbox-group-heading:before{content:""}.layout-editor>.layout-toolbox .layout-toolbox-group.collapsed .layout-toolbox-items{display:none}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-section+.layout-toolbox-section{margin-top:4px}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item{border:1px solid #e4e5e6;background-color:#fff;padding:9px 12px;cursor:default}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item i{display:inline-block;width:16px;font:normal normal normal 14px/1 FontAwesome}.layout-editor>.layout-toolbox .layout-toolbox-group .layout-toolbox-item+.layout-toolbox-item{margin-top:4px}.layout-editor>.layout-toolbox .layout-toolbox-group+.layout-toolbox-group{margin-top:6px}.layout-editor .layout-popup{display:none;position:absolute;margin:0;-moz-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);-webkit-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);border:1px solid #e4e5e6;padding:2px 0;background-color:#f7f7f7;list-style:none;z-index:20;color:#7c7c7c;text-align:left;cursor:default;white-space:nowrap;line-height:normal;width:300px}.layout-editor .layout-popup.wide{width:600px}.layout-editor .layout-popup .layout-popup-flex{display:flex;padding:2px 5px}.layout-editor .layout-popup .layout-popup-flex .layout-popup-column+.layout-popup-column{margin-left:4px;border-left:1px solid rgba(128,128,128,.15);padding-left:4px}.layout-editor .layout-popup .layout-popup-item{padding:4px 6px}.layout-editor .layout-popup .layout-popup-label{font-size:.9em;font-weight:bold;color:#7c7c7c}.layout-editor .layout-popup .layout-popup-action:hover{background-color:#f3f4f5;cursor:pointer}.layout-editor .layout-popup .layout-popup-input input,.layout-editor .layout-popup .layout-popup-input textarea{width:100%}.layout-editor .layout-popup .layout-popup-input>label{display:block;font-size:.9em} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.css index 7c22aa391..2157aff9c 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.css @@ -15,6 +15,10 @@ cursor: default; white-space: nowrap; line-height: normal; + width: 300px; +} +.layout-editor .layout-popup.wide { + width: 600px; } .layout-editor .layout-popup .layout-popup-flex { display: flex; @@ -37,6 +41,10 @@ background-color: #f3f4f5; cursor: pointer; } +.layout-editor .layout-popup .layout-popup-input input, +.layout-editor .layout-popup .layout-popup-input textarea { + width: 100%; +} .layout-editor .layout-popup .layout-popup-input > label { display: block; font-size: 0.9em; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.less b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.less index 8667a4d55..df3bbcb35 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.less +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.less @@ -18,6 +18,11 @@ cursor: default; white-space: nowrap; line-height: normal; + width: 300px; + + &.wide { + width: 600px; + } .layout-popup-flex { display: flex; @@ -46,6 +51,10 @@ } .layout-popup-input { + input, textarea { + width: 100%; + } + > label { display: block; font-size: 0.9em; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.min.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.min.css index fa57b82c7..ef8a81db1 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.min.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.min.css @@ -1 +1 @@ -.layout-editor .layout-popup{display:none;position:absolute;margin:0;-moz-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);-webkit-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);border:1px solid #e4e5e6;padding:2px 0;background-color:#f7f7f7;list-style:none;z-index:20;color:#7c7c7c;text-align:left;cursor:default;white-space:nowrap;line-height:normal}.layout-editor .layout-popup .layout-popup-flex{display:flex;padding:2px 5px}.layout-editor .layout-popup .layout-popup-flex .layout-popup-column+.layout-popup-column{margin-left:4px;border-left:1px solid rgba(128,128,128,.15);padding-left:4px}.layout-editor .layout-popup .layout-popup-item{padding:4px 6px}.layout-editor .layout-popup .layout-popup-label{font-size:.9em;font-weight:bold;color:#7c7c7c}.layout-editor .layout-popup .layout-popup-action:hover{background-color:#f3f4f5;cursor:pointer}.layout-editor .layout-popup .layout-popup-input>label{display:block;font-size:.9em} \ No newline at end of file +.layout-editor .layout-popup{display:none;position:absolute;margin:0;-moz-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);-webkit-box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);box-shadow:3px 3px 11px 0 rgba(50,50,50,.5);border:1px solid #e4e5e6;padding:2px 0;background-color:#f7f7f7;list-style:none;z-index:20;color:#7c7c7c;text-align:left;cursor:default;white-space:nowrap;line-height:normal;width:300px}.layout-editor .layout-popup.wide{width:600px}.layout-editor .layout-popup .layout-popup-flex{display:flex;padding:2px 5px}.layout-editor .layout-popup .layout-popup-flex .layout-popup-column+.layout-popup-column{margin-left:4px;border-left:1px solid rgba(128,128,128,.15);padding-left:4px}.layout-editor .layout-popup .layout-popup-item{padding:4px 6px}.layout-editor .layout-popup .layout-popup-label{font-size:.9em;font-weight:bold;color:#7c7c7c}.layout-editor .layout-popup .layout-popup-action:hover{background-color:#f3f4f5;cursor:pointer}.layout-editor .layout-popup .layout-popup-input input,.layout-editor .layout-popup .layout-popup-input textarea{width:100%}.layout-editor .layout-popup .layout-popup-input>label{display:block;font-size:.9em} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Html.cshtml b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Html.cshtml index fe336ae2f..2d17e58a3 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Html.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Html.cshtml @@ -3,6 +3,7 @@
  • {{::element.contentTypeLabel}}
  • @Display(New.LayoutEditor_Template_Properties(ElementTypeName: "{{element.contentTypeLabel.toLowerCase()}}")) + @Display(New.LayoutEditor_Template_Rule(ElementTypeName: "{{element.contentTypeLabel.toLowerCase()}}"))
  • diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Properties.cshtml b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Properties.cshtml index f8a11319a..07eae8ea6 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Properties.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Properties.cshtml @@ -19,7 +19,7 @@
  • @if (Model.Items != null) { diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Rule.cshtml b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Rule.cshtml new file mode 100644 index 000000000..8a35cfe27 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Rule.cshtml @@ -0,0 +1,12 @@ +@using Orchard.Layouts.ViewModels +
  • + +
      +
    • + +
    • +
    +
  • \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/RuleManager.cs b/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/RuleManager.cs index 0f5ad2245..83eb446d5 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/RuleManager.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/RuleManager.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Security.Cryptography.X509Certificates; using Orchard.Localization; using Orchard.Scripting; using Orchard.Widgets.Services;