diff --git a/src/Orchard.Web/Core/Common/Extensions/CommonMetaDataExtensions.cs b/src/Orchard.Web/Core/Common/Extensions/CommonMetaDataExtensions.cs new file mode 100644 index 000000000..e2239064a --- /dev/null +++ b/src/Orchard.Web/Core/Common/Extensions/CommonMetaDataExtensions.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using Orchard.ContentManagement.MetaData.Builders; + +namespace Orchard.ContentManagement.MetaData { + public static class CommonMetaDataExtensions { + /// + /// Adds IdentityPart to the content type. + /// + /// The ContentTypeDefinitionBuilder object on which this method is called. + public static ContentTypeDefinitionBuilder WithIdentity(this ContentTypeDefinitionBuilder builder) { + return builder.WithPart("IdentityPart"); + } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Containers/Migrations.cs b/src/Orchard.Web/Core/Containers/Migrations.cs index 7c8ee0577..d159c2a68 100644 --- a/src/Orchard.Web/Core/Containers/Migrations.cs +++ b/src/Orchard.Web/Core/Containers/Migrations.cs @@ -38,6 +38,7 @@ namespace Orchard.Core.Containers { .WithPart("CommonPart") .WithPart("WidgetPart") .WithPart("ContainerWidgetPart") + .WithIdentity() .WithSetting("Stereotype", "Widget")); ContentDefinitionManager.AlterPartDefinition("ContainerPart", part => part @@ -48,7 +49,7 @@ namespace Orchard.Core.Containers { .Attachable() .WithDescription("Allows your content item to be contained by a content item that has the ContainerPart attached.")); - return 6; + return 7; } public int UpdateFrom1() { @@ -123,5 +124,12 @@ namespace Orchard.Core.Containers { return 6; } + + public int UpdateFrom6() { + ContentDefinitionManager.AlterTypeDefinition("ContainerWidget", type => type + .WithIdentity()); + + return 7; + } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Navigation/Migrations.cs b/src/Orchard.Web/Core/Navigation/Migrations.cs index 48f891805..861c11004 100644 --- a/src/Orchard.Web/Core/Navigation/Migrations.cs +++ b/src/Orchard.Web/Core/Navigation/Migrations.cs @@ -20,7 +20,7 @@ namespace Orchard.Core.Navigation { ContentDefinitionManager.AlterTypeDefinition("MenuItem", cfg => cfg .WithPart("MenuPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("CommonPart") .DisplayedAs("Custom Link") .WithSetting("Description", "Represents a simple custom link with a text and an url.") @@ -34,7 +34,7 @@ namespace Orchard.Core.Navigation { ContentDefinitionManager.AlterTypeDefinition("MenuWidget", cfg => cfg .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("WidgetPart") .WithPart("MenuWidgetPart") .WithSetting("Stereotype", "Widget") @@ -52,7 +52,7 @@ namespace Orchard.Core.Navigation { .WithPart("MenuPart") .WithPart("BodyPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .DisplayedAs("Html Menu Item") .WithSetting("Description", "Renders some custom HTML in the menu.") .WithSetting("BodyPartSettings.FlavorDefault", "html") @@ -92,7 +92,7 @@ namespace Orchard.Core.Navigation { ContentDefinitionManager.AlterTypeDefinition("MenuItem", cfg => cfg .WithPart("MenuPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .DisplayedAs("Custom Link") .WithSetting("Description", "Represents a simple custom link with a text and an url.") .WithSetting("Stereotype", "MenuItem") // because we declare a new stereotype, the Shape MenuItem_Edit is needed @@ -115,7 +115,7 @@ namespace Orchard.Core.Navigation { ContentDefinitionManager.AlterTypeDefinition("MenuWidget", cfg => cfg .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("WidgetPart") .WithPart("MenuWidgetPart") .WithSetting("Stereotype", "Widget") @@ -130,7 +130,7 @@ namespace Orchard.Core.Navigation { .WithPart("MenuPart") .WithPart("BodyPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .DisplayedAs("Html Menu Item") .WithSetting("Description", "Renders some custom HTML in the menu.") .WithSetting("BodyPartSettings.FlavorDefault", "html") @@ -172,7 +172,7 @@ namespace Orchard.Core.Navigation { public int UpdateFrom5() { ContentDefinitionManager.AlterTypeDefinition("Menu", cfg => cfg - .WithPart("IdentityPart") + .WithIdentity() ); return 6; diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 3d02d80bf..4477bb0ec 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -95,6 +95,7 @@ + diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs b/src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs index f11ba7dd3..b833ede2a 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs @@ -31,6 +31,10 @@ namespace Orchard.Autoroute.Services { public IContent GetHomePage(VersionOptions version = null) { var homePageRoute = GetHomeRoute(); + + if (homePageRoute == null) + return null; + var alias = LookupAlias(homePageRoute); if (alias == null) @@ -74,4 +78,4 @@ namespace Orchard.Autoroute.Services { return alias != null ? alias.Path : null; } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Migrations.cs index 97580b798..57067be36 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Migrations.cs @@ -66,7 +66,7 @@ namespace Orchard.Azure.MediaServices { ContentDefinitionManager.AlterTypeDefinition("CloudVideo", type => type .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("MediaPart") .WithPart("TitlePart") .WithPart("PublishLaterPart") diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs index e4b00a464..60e0fcb54 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs @@ -80,7 +80,7 @@ namespace Orchard.Blogs { .WithPart("CommonPart") .WithPart("WidgetPart") .WithSetting("Stereotype", "Widget") - .WithPart("IdentityPart") + .WithIdentity() ); return 7; @@ -134,12 +134,12 @@ namespace Orchard.Blogs { public int UpdateFrom6() { ContentDefinitionManager.AlterTypeDefinition("RecentBlogPosts", cfg => cfg - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("BlogArchives", cfg => cfg - .WithPart("IdentityPart") + .WithIdentity() ); return 7; diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs index 379c77d2c..9d6de0ece 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs @@ -56,7 +56,7 @@ namespace Orchard.Comments { p => p .WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false") .WithSetting("DateEditorSettings.ShowDateEditor", "false")) - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Blog", @@ -82,7 +82,7 @@ namespace Orchard.Comments { } public int UpdateFrom1() { - ContentDefinitionManager.AlterTypeDefinition("Comment", cfg => cfg.WithPart("IdentityPart")); + ContentDefinitionManager.AlterTypeDefinition("Comment", cfg => cfg.WithIdentity()); return 2; } diff --git a/src/Orchard.Web/Modules/Orchard.ContentPicker/Migrations.cs b/src/Orchard.Web/Modules/Orchard.ContentPicker/Migrations.cs index 405fcc978..91b73fabb 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentPicker/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentPicker/Migrations.cs @@ -16,7 +16,7 @@ namespace Orchard.ContentPicker { ContentDefinitionManager.AlterTypeDefinition("ContentMenuItem", cfg => cfg .WithPart("MenuPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("ContentMenuItemPart") .DisplayedAs("Content Menu Item") .WithSetting("Description", "Adds a Content Item to the menu.") diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Migrations.cs b/src/Orchard.Web/Modules/Orchard.CustomForms/Migrations.cs index f3d75d9c1..dad45d608 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Migrations.cs @@ -37,7 +37,7 @@ namespace Orchard.CustomForms { cfg => cfg .WithPart("WidgetPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("CustomFormPart") .WithSetting("Stereotype", "Widget") ); diff --git a/src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs index 97bf38c37..7ce3a0711 100644 --- a/src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs @@ -7,7 +7,7 @@ namespace Orchard.Dashboards { public int Create() { ContentDefinitionManager.AlterTypeDefinition("Dashboard", type => type .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("TitlePart") .WithPart("LayoutPart", p => p .WithSetting("LayoutTypePartSettings.DefaultLayoutData", DefaultDashboardSelector.DefaultLayout))); diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Migrations.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Migrations.cs index cc20cd75a..03a434b58 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Migrations.cs @@ -108,7 +108,7 @@ namespace Orchard.DynamicForms { public int UpdateFrom2() { ContentDefinitionManager.AlterTypeDefinition("FormWidget", type => type - .WithPart("IdentityPart")); + .WithIdentity()); return 3; } diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs index 8b68d9f7e..e8b8675a0 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs @@ -1,5 +1,6 @@ -using System; +using System; using System.Collections.Generic; +using System.Linq; using System.Text.RegularExpressions; using Orchard.DisplayManagement.Shapes; using Orchard.Layouts.Framework.Elements; @@ -37,11 +38,17 @@ namespace Orchard.Layouts.Helpers { attributes["style"] = Regex.Replace(tokenize(), @"(?:\r\n|[\r\n])", ""); } + IList classes = shape.Classes; + if (!String.IsNullOrWhiteSpace(htmlClass)) { var tokenize = (Func)shape.TokenizeHtmlClass; - attributes["class"] = tokenize(); + var cssClass = tokenize(); + classes.Add(cssClass); } + if(classes.Any()) + attributes["class"] = String.Join(" ", classes); + return attributes; } @@ -51,4 +58,4 @@ namespace Orchard.Layouts.Helpers { } } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs index 746120763..0261358fc 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs @@ -29,7 +29,7 @@ namespace Orchard.Layouts { .WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false") .WithSetting("DateEditorSettings.ShowDateEditor", "false")) .WithPart("TitlePart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("LayoutPart", p => p .WithSetting("LayoutTypePartSettings.IsTemplate", "True")) .DisplayedAs("Layout") @@ -39,7 +39,7 @@ namespace Orchard.Layouts { .WithPart("CommonPart", p => p .WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false") .WithSetting("DateEditorSettings.ShowDateEditor", "false")) - .WithPart("IdentityPart") + .WithIdentity() .WithPart("WidgetPart") .WithPart("LayoutPart") .WithSetting("Stereotype", "Widget") @@ -72,7 +72,7 @@ namespace Orchard.Layouts { public int UpdateFrom2() { ContentDefinitionManager.AlterTypeDefinition("Layout", type => type - .WithPart("IdentityPart")); + .WithIdentity()); return 3; } @@ -83,7 +83,7 @@ namespace Orchard.Layouts { .WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false") .WithSetting("DateEditorSettings.ShowDateEditor", "false")) .WithPart("WidgetPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("ElementWrapperPart", p => p .WithSetting("ElementWrapperPartSettings.ElementTypeName", elementTypeName)) .WithSetting("Stereotype", "Widget") diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Services/LayoutModelMapper.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Services/LayoutModelMapper.cs index 8d05c73f2..e5dafd564 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Services/LayoutModelMapper.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Services/LayoutModelMapper.cs @@ -20,7 +20,7 @@ namespace Orchard.Layouts.Services { public object ToEditorModel(string layoutData, DescribeElementsContext describeContext) { var elements = _serializer.Deserialize(layoutData, describeContext); - var canvas = elements.FirstOrDefault(x => x is Canvas) ?? new Canvas(); + var canvas = elements.FirstOrDefault(x => x is Canvas) ?? _elementManager.ActivateElement(); return ToEditorModel(canvas, describeContext); } diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs index 8a6be0d4c..6591d036c 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs @@ -59,41 +59,41 @@ namespace Orchard.MediaLibrary { .DisplayedAs("Image") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") .AsImage() - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("VectorImage", td => td .DisplayedAs("Vector Image") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") .AsVectorImage() - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Video", td => td .DisplayedAs("Video") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") .AsVideo() - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Audio", td => td .DisplayedAs("Audio") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") .AsAudio() - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Document", td => td .DisplayedAs("Document") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") .AsDocument() - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("OEmbed", td => td .DisplayedAs("External Media") .WithSetting("Stereotype", "Media") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("CommonPart") .WithPart("MediaPart") .WithPart("OEmbedPart") @@ -105,23 +105,23 @@ namespace Orchard.MediaLibrary { public int UpdateFrom2() { ContentDefinitionManager.AlterTypeDefinition("Image", td => td - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Video", td => td - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Audio", td => td - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("Document", td => td - .WithPart("IdentityPart") + .WithIdentity() ); ContentDefinitionManager.AlterTypeDefinition("OEmbed", td => td - .WithPart("IdentityPart") + .WithIdentity() ); return 3; @@ -200,7 +200,7 @@ namespace Orchard.MediaLibrary { .DisplayedAs("Vector Image") .WithSetting("Stereotype", "Media") .WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", "True") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("CommonPart") .WithPart("MediaPart") .WithPart("VectorImagePart") diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Migrations.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Migrations.cs index 242c96023..0123d5a0e 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Migrations.cs @@ -14,7 +14,7 @@ namespace Orchard.MediaProcessing { cfg => cfg .WithPart("ImageProfilePart") .WithPart("CommonPart", p => p.WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false")) - .WithPart("IdentityPart") + .WithIdentity() ); SchemaBuilder.CreateTable("FilterRecord", diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs index 1f721e147..149e87667 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs @@ -64,7 +64,7 @@ namespace Orchard.Projections { cfg => cfg .WithPart("QueryPart") .WithPart("TitlePart") - .WithPart("IdentityPart") + .WithIdentity() ); SchemaBuilder.CreateTable("QueryPartRecord", @@ -179,7 +179,7 @@ namespace Orchard.Projections { cfg => cfg .WithPart("WidgetPart") .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("ProjectionPart") .WithSetting("Stereotype", "Widget") ); @@ -277,7 +277,7 @@ namespace Orchard.Projections { public int UpdateFrom3() { ContentDefinitionManager.AlterTypeDefinition("NavigationQueryMenuItem", cfg => cfg - .WithPart("IdentityPart") + .WithIdentity() ); return 4; diff --git a/src/Orchard.Web/Modules/Orchard.Resources/Assets.json b/src/Orchard.Web/Modules/Orchard.Resources/Assets.json index 14ac76a7e..660851895 100644 --- a/src/Orchard.Web/Modules/Orchard.Resources/Assets.json +++ b/src/Orchard.Web/Modules/Orchard.Resources/Assets.json @@ -262,10 +262,10 @@ "Assets/Js/Bootstrap/collapse.js", "Assets/Js/Bootstrap/dropdown.js", "Assets/Js/Bootstrap/modal.js", + "Assets/Js/Bootstrap/tooltip.js", "Assets/Js/Bootstrap/popover.js", "Assets/Js/Bootstrap/scrollspy.js", - "Assets/Js/Bootstrap/tab.js", - "Assets/Js/Bootstrap/tooltip.js", + "Assets/Js/Bootstrap/tab.js", "Assets/Js/Bootstrap/transition.js" ], "output": "Scripts/bootstrap.js" diff --git a/src/Orchard.Web/Modules/Orchard.Search/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Search/Migrations.cs index abd815677..a680469c0 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Search/Migrations.cs @@ -27,7 +27,7 @@ namespace Orchard.Search { public int UpdateFrom2() { ContentDefinitionManager.AlterTypeDefinition("SearchForm", - cfg => cfg.WithPart("IdentityPart")); + cfg => cfg.WithIdentity()); return 3; } diff --git a/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj b/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj index 277138033..04be22347 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj +++ b/src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj @@ -126,6 +126,10 @@ Orchard.Framework false + + {9916839c-39fc-4ceb-a5af-89ca7e87119f} + Orchard.Core + {73a7688a-5bd3-4f7e-adfa-ce36c5a10e3b} Orchard.MediaLibrary diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Migrations/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Templates/Migrations/Migrations.cs index 4b68c649d..87668afd1 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Migrations/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Templates/Migrations/Migrations.cs @@ -12,7 +12,7 @@ namespace Orchard.Templates { ContentDefinitionManager.AlterTypeDefinition("Template", type => type .WithPart("CommonPart") - .WithPart("IdentityPart") + .WithIdentity() .WithPart("TitlePart") .WithPart("ShapePart") .Draftable()); diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Extensions/WidgetsMetaDataExtensions.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Extensions/WidgetsMetaDataExtensions.cs index e043ec465..ffa6b4294 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Extensions/WidgetsMetaDataExtensions.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Extensions/WidgetsMetaDataExtensions.cs @@ -25,8 +25,8 @@ namespace Orchard.ContentManagement.MetaData { return builder .WithPart("CommonPart") .WithPart("WidgetPart") - .WithPart("IdentityPart") - .WithSetting("Stereotype", "Widget"); + .WithSetting("Stereotype", "Widget") + .WithIdentity(); } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs index c1f2b91b0..fbfedb3ba 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs @@ -44,7 +44,7 @@ namespace Orchard.Widgets { } public int UpdateFrom1() { - ContentDefinitionManager.AlterTypeDefinition("HtmlWidget", cfg => cfg.WithPart("IdentityPart")); + ContentDefinitionManager.AlterTypeDefinition("HtmlWidget", cfg => cfg.WithIdentity()); return 2; } diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows.js b/src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows.js index f9c15784e..325721a52 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows.js +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows.js @@ -97,7 +97,7 @@ } else { var lowerCaseText = text.toLowerCase(); $(".activity-toolbox-item").each(function () { - var recordText = $(this).data("activity-text").toLowerCase(); + var recordText = $(this).data("activity-name").toLowerCase(); $(this).toggle(recordText.indexOf(lowerCaseText) >= 0); }); }