From 91a88c2e90dfffe462655fcd8a3a12b7302259f9 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 19 Oct 2010 11:09:59 -0700 Subject: [PATCH] Updating comments w/ content shape alternate examples and a little addtl. cleanup --HG-- branch : dev --- src/Orchard.Web/Core/Contents/Shapes.cs | 4 ++-- src/Orchard.Web/Core/Shapes/CoreShapes.cs | 8 ++++---- src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Orchard.Web/Core/Contents/Shapes.cs b/src/Orchard.Web/Core/Contents/Shapes.cs index 22615f9df..1f3211664 100644 --- a/src/Orchard.Web/Core/Contents/Shapes.cs +++ b/src/Orchard.Web/Core/Contents/Shapes.cs @@ -18,7 +18,7 @@ namespace Orchard.Core.Contents { displaying.ShapeMetadata.Alternates.Add("Content__" + contentItem.Id); //Content.Summary displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType); - //Content.Summary-Page + //Content-Page.Summary displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType + "__" + contentItem.ContentType); if (!displaying.ShapeMetadata.DisplayType.Contains("Admin")) @@ -30,7 +30,7 @@ namespace Orchard.Core.Contents { .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; if (contentItem != null) { - //Content.Editor-Page + //Content-Page.Edit displaying.ShapeMetadata.Alternates.Add("Content_Edit__" + contentItem.ContentType); } }); diff --git a/src/Orchard.Web/Core/Shapes/CoreShapes.cs b/src/Orchard.Web/Core/Shapes/CoreShapes.cs index bb49c0a00..ed1bd9c2c 100644 --- a/src/Orchard.Web/Core/Shapes/CoreShapes.cs +++ b/src/Orchard.Web/Core/Shapes/CoreShapes.cs @@ -12,7 +12,6 @@ using Orchard.Settings; using Orchard.UI; using Orchard.UI.Resources; using Orchard.UI.Zones; -using Orchard.Utility.Extensions; // ReSharper disable InconsistentNaming @@ -75,9 +74,10 @@ namespace Orchard.Core.Shapes { // 'List' shapes start with several empty collections builder.Describe("List") .OnCreated(created => { - created.Shape.Tag = "ul"; - created.Shape.ItemClasses = new List(); - created.Shape.ItemAttributes = new Dictionary(); + var list = created.Shape; + list.Tag = "ul"; + list.ItemClasses = new List(); + list.ItemAttributes = new Dictionary(); }); } diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs index f40a42daa..45b2a5466 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs @@ -8,7 +8,6 @@ namespace Orchard.Widgets { builder.Describe("Widget") .Configure(descriptor => { // todo: have "alternates" for chrome - // todo: (heskew) something...this still doesn't feel right descriptor.Wrappers.Add("Widget_Wrapper"); descriptor.Wrappers.Add("Widget_ControlWrapper"); })