diff --git a/.gitignore b/.gitignore index 8c1601a0a..c110e2248 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,9 @@ ipch/ _ReSharper*/ *.[Rr]e[Ss]harper +# CodeRush is a .NET coding add-in +.cr*/ + # TeamCity is a build add-in _TeamCity* diff --git a/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml b/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml index b11cb0939..746efc39b 100644 --- a/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml +++ b/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml @@ -63,8 +63,8 @@ @T("Determines whether scripts and stylesheets load in their debuggable or minified form.")
- @Html.LabelFor(m => m.UseCdn, T("Use CDN")) @Html.CheckBoxFor(m => m.UseCdn) + @Html.LabelFor(m => m.UseCdn, T("Use CDN").Text, new { @class = "forcheckbox" }) @T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")
@@ -84,4 +84,4 @@ @T("Determines the last element of the database that can be displayed. Leave 0 for unlimited.")
} - \ No newline at end of file + diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs index 4ad6fe51e..4b6217c83 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using Orchard.ContentManagement.MetaData; namespace Orchard.ContentTypes.ViewModels { @@ -11,19 +10,16 @@ namespace Orchard.ContentTypes.ViewModels { /// /// The technical name of the field /// - [Required] public string Name { get; set; } /// /// The display name of the field /// - [Required] public string DisplayName { get; set; } /// /// The selected field type /// - [Required] public string FieldTypeName { get; set; } /// diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs index db01940c6..fb046ad99 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using Orchard.ContentManagement.MetaData; namespace Orchard.ContentTypes.ViewModels { @@ -12,7 +11,6 @@ namespace Orchard.ContentTypes.ViewModels { /// /// The display name of the field /// - [Required] public string DisplayName { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml index d8a7dee0d..d54b645d3 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml @@ -4,17 +4,19 @@ Style.Require("ContentTypesAdmin"); Layout.Title = T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString(); + + var returnUrl = Request.QueryString["returnUrl"]; } @using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()
- + @Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"}) @T("Name of the field as it will be displayed in screens.") - + @Html.TextBoxFor(m => m.Name, new {@class = "text"}) - @T("Technical name of the field.") + @T("Technical name of the field.")
@@ -22,6 +24,9 @@
+ @if (!String.IsNullOrWhiteSpace(returnUrl) && Request.IsLocalUrl(returnUrl)) { + @T("Cancel") + }
} diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml index 9751beaa8..bc0b6868a 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml @@ -1,8 +1,10 @@ +@using Orchard.Utility.Extensions; @model Orchard.ContentTypes.ViewModels.EditTypeViewModel @{ Style.Require("ContentTypesAdmin"); Script.Require("jQuery"); Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text; + var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString(); }
@@ -27,7 +29,7 @@

@T("Fields")

- @Html.ActionLink(T("Add Field").Text, "AddFieldTo", new { area = "Orchard.ContentTypes", id = Model.Name }, new { @class = "button" }) + @Html.ActionLink(T("Add Field").Text, "AddFieldTo", new { area = "Orchard.ContentTypes", id = Model.Name, returnUrl }, new { @class = "button" })
@Html.EditorFor(m => m.Fields, "Fields", "")

@T("Parts")

diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml index 7ea22ac44..1ecb517d4 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml @@ -4,12 +4,14 @@ Style.Require("ContentTypesAdmin"); Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString(); + + var returnUrl = Request.QueryString["returnUrl"]; } @using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()
- + @Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"}) @T("Name of the field as it will be displayed in screens.") @@ -17,5 +19,8 @@
+ @if (!String.IsNullOrWhiteSpace(returnUrl) && Request.IsLocalUrl(returnUrl)) { + @T("Cancel") + }
} diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml index 1313e5143..db780c845 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml @@ -1,13 +1,16 @@ @using Orchard.Utility.Extensions @model Orchard.ContentTypes.ViewModels.EditPartFieldViewModel -
-

@Model.DisplayName (@Model.FieldDefinition.Name.CamelFriendly())

-
- @Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }) | - @Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) -
-
- @{Html.RenderTemplates(Model.Templates);} - @Html.HiddenFor(m => m.Name)@Html.HiddenFor(m => m.FieldDefinition.Name)@Html.HiddenFor(m => m.Index) -
-
\ No newline at end of file +@{ + var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString(); +} +
+

@Model.DisplayName (@Model.FieldDefinition.Name.CamelFriendly())

+
+ @Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name, returnUrl }) | + @Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) +
+
+ @{Html.RenderTemplates(Model.Templates);} + @Html.HiddenFor(m => m.Name)@Html.HiddenFor(m => m.FieldDefinition.Name)@Html.HiddenFor(m => m.Index) +
+
\ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs index beb915651..232cc7253 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs @@ -32,7 +32,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] { "text", "large", "tokenized" }, + Classes: new[] { "text", "large" }, Description: T("The value of this checkbox."))); return form; diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs index 4bbd49372..91c9da709 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs @@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] { "text", "medium", "tokenized" }, + Classes: new[] { "text", "medium" }, Description: T("The value of this email field."))); return form; diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs index b8a4f7d5b..b99c3c1bf 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs @@ -27,7 +27,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] { "text", "medium", "tokenized" }, + Classes: new[] { "text", "medium" }, Description: T("The value of this hidden field."))); return form; @@ -40,7 +40,7 @@ namespace Orchard.DynamicForms.Drivers { // Allow the initial value to be tokenized. // If a value was posted, use that value instead (without tokenizing it). - context.ElementShape.ProcessedValue = element.PostedValue != null ? element.PostedValue : _tokenizer.Replace(element.RuntimeValue, tokenData, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode }); + context.ElementShape.ProcessedValue = element.PostedValue != null ? element.PostedValue : _tokenizer.Replace(element.RuntimeValue ?? "", tokenData, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode }); } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs index dc52384d8..3dc880b8a 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs @@ -30,7 +30,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] { "text", "large", "tokenized" }, + Classes: new[] { "text", "large" }, Description: T("The value of this text area.")), _Rows: shape.Textbox( Id: "Rows", diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs index 5ba11d182..821c5a1f0 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs @@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] { "text", "medium", "tokenized" }, + Classes: new[] { "text", "medium" }, Description: T("The value of this text field."))); return form; diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs index d1e9b4943..05ecc9c04 100644 --- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs @@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers { Id: "Value", Name: "Value", Title: "Value", - Classes: new[] {"text", "medium", "tokenized"}, + Classes: new[] { "text", "medium" }, Description: T("The value of this URL field."))); return form; diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml index 9adbae3e6..c039f3e81 100644 --- a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml @@ -5,7 +5,7 @@ var settings = Model.PartFieldDefinition.Settings.GetModel(); }
- + @switch (settings.SelectionMode) { case SelectionMode.Checkbox: checked="checked" } /> diff --git a/src/Orchard.Web/Modules/Orchard.ImageEditor/Styles/orchard-imageeditor-admin.css b/src/Orchard.Web/Modules/Orchard.ImageEditor/Styles/orchard-imageeditor-admin.css index fdbca25f6..15f2e0632 100644 --- a/src/Orchard.Web/Modules/Orchard.ImageEditor/Styles/orchard-imageeditor-admin.css +++ b/src/Orchard.Web/Modules/Orchard.ImageEditor/Styles/orchard-imageeditor-admin.css @@ -1,4 +1,4 @@ -/* Reset +/* Reset ***************************************************************/ html, body, div, span, applet, object, iframe, @@ -335,7 +335,7 @@ button:hover, .button:hover, a.button:hover { background: -moz-linear-gradient(top, rgba(110, 127, 69, 1.0), rgba(106, 123, 66, 1.0)); } -button:active, .buton:active, a.button:active { +button:active, .button:active, a.button:active { text-decoration:none; background:#6a7b42; border:1px solid #487328; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Providers/ContentFieldElementHarvester.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Providers/ContentFieldElementHarvester.cs index 57ff7465c..341a5f409 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Providers/ContentFieldElementHarvester.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Providers/ContentFieldElementHarvester.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; @@ -52,20 +52,18 @@ namespace Orchard.Layouts.Providers { } private IEnumerable> GetContentFieldTuples(HarvestElementsContext context) { - var contentTypeDefinition = context.Content != null - ? _contentDefinitionManager.Value.GetTypeDefinition(context.Content.ContentItem.ContentType) - : default(ContentTypeDefinition); - - var parts = contentTypeDefinition != null - ? contentTypeDefinition.Parts.Select(x => x.PartDefinition) - : _contentDefinitionManager.Value.ListPartDefinitions(); + // If there is no content item provided as context, there are no fields made available. + if (context.Content == null) + return Enumerable.Empty>(); + var contentTypeDefinition = _contentDefinitionManager.Value.GetTypeDefinition(context.Content.ContentItem.ContentType); + var parts = contentTypeDefinition.Parts.Select(x => x.PartDefinition); var fields = parts.SelectMany(part => part.Fields.Select(field => Tuple.Create(part, field))); // TODO: Each module should be able to tell which fields are supported as droppable elements. var blackList = new string[0]; - return fields.Where(t => blackList.All(x => t.Item2.FieldDefinition.Name != x)); + return fields.Where(t => blackList.All(x => t.Item2.FieldDefinition.Name != x)).ToList(); } private void Displaying(ElementDisplayingContext context) { @@ -88,4 +86,4 @@ namespace Orchard.Layouts.Providers { context.ElementShape.ContentField = contentFieldShape; } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css index e78f8be21..7b7743f95 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Styles/admin-dialog.css @@ -760,7 +760,7 @@ button:hover, .button:hover, a.button:hover { background: -moz-linear-gradient(top, rgba(110, 127, 69, 1.0), rgba(106, 123, 66, 1.0)); } -button:active, .buton:active, a.button:active { +button:active, .button:active, a.button:active { text-decoration:none; background:#6a7b42; border:1px solid #487328; diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Styles/orchard-medialibrary-admin.css b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Styles/orchard-medialibrary-admin.css index 24d8b0873..9831fb6a7 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Styles/orchard-medialibrary-admin.css +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Styles/orchard-medialibrary-admin.css @@ -345,7 +345,7 @@ -ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis; - text-wrap: none; + white-space: nowrap; } .media-library-main-list-overlay .publication-status { diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml index bb3f7c63e..0b16a8a00 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml @@ -42,7 +42,7 @@
-

+

diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml index 1a7bde8fd..49e8befb6 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml +++ b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml @@ -11,13 +11,14 @@ true - @@ -55,9 +56,9 @@ layer create Anonymous /LayerRule:"not authenticated" /Description:"The widgets in this layer are displayed when the user is anonymous" layer create Disabled /LayerRule:"false" /Description:"The widgets in this layer are never displayed" layer create TheHomepage /LayerRule:"url '~/'" /Description:"The widgets in this layer are displayed on the home page" - widget create HtmlWidget /Title:"First Leader Aside" /Zone:"TripelFirst" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget1" /UseLoremIpsumText:true - widget create HtmlWidget /Title:"Second Leader Aside" /Zone:"TripelSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget2" /UseLoremIpsumText:true - widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true + widget create RecentBlogPosts /Title:"Recent Blog Posts" /Zone:"AsideSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"RecentBlogPosts1" + widget create BlogArchives /Title:"Blog Archives" /Zone:"AsideSecond" /Position:"6" /Layer:"TheHomepage" /Identity:"BlogArchives1" + widget create TagCloud /Title:"Blog Post Tags" /Zone:"AsideSecond" /Position:"7" /Layer:"TheHomepage" /Identity:"TagCloud1" site setting set baseurl theme activate "The Theme Machine" menu create /MenuName:"Main Menu" @@ -65,4 +66,4 @@ menuitem create /MenuPosition:"0" /MenuText:"Home" /Url:"~/" /MenuName:"Main Menu" widget create MenuWidget /Title:"Main Menu" /RenderTitle:false /Zone:"Navigation" /Position:"1" /Layer:"Default" /Identity:"MenuWidget1" /MenuName:"Main Menu" - + \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs b/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs index 6808aa377..bd50820bd 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs @@ -39,7 +39,7 @@ namespace Orchard.Tags.Services { public Localizer T { get; set; } public IEnumerable GetTags() { - return _tagRepository.Table.ToList(); + return _tagRepository.Table.OrderBy(x => x.TagName).ToList(); } public IEnumerable GetTagsByNameSnippet(string snippet, int maxCount = 10) { diff --git a/src/Orchard.Web/Modules/Orchard.Templates/Drivers/ShapePartDriver.cs b/src/Orchard.Web/Modules/Orchard.Templates/Drivers/ShapePartDriver.cs index 986760e0e..4504ef767 100644 --- a/src/Orchard.Web/Modules/Orchard.Templates/Drivers/ShapePartDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Templates/Drivers/ShapePartDriver.cs @@ -81,7 +81,7 @@ namespace Orchard.Templates.Drivers { return true; } - updater.AddModelError("Title", T("{0} names can only contain alphanumerical or underscore (_) characters and have to start with a letter.", part.ContentItem.TypeDefinition.DisplayName)); + updater.AddModelError("Title", T("{0} names can only contain alphanumerical or underscore (_) characters and have to start with a letter.", T(part.ContentItem.TypeDefinition.DisplayName))); return false; } diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/site.css b/src/Orchard.Web/Themes/SafeMode/Styles/site.css index 0219a7c6e..7a201a2f1 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/site.css +++ b/src/Orchard.Web/Themes/SafeMode/Styles/site.css @@ -239,7 +239,7 @@ button:hover, .button:hover, a.button:hover { background: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(110, 127, 69, 1.0)), to(rgba(106, 123, 66, 1.0))); background: -moz-linear-gradient(top, rgba(110, 127, 69, 1.0), rgba(106, 123, 66, 1.0)); } -button:active, .buton:active, a.button:active { +button:active, .button:active, a.button:active { text-decoration:none; background:#6a7b42; border:1px solid #487328; @@ -341,4 +341,4 @@ span.message { } .debug.message:before { content:"DEBUG » "; -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index bff6c7907..3e0e32243 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -780,7 +780,7 @@ button:hover, .button:hover, a.button:hover { background: -moz-linear-gradient(top, rgba(110, 127, 69, 1.0), rgba(106, 123, 66, 1.0)); } -button:active, .buton:active, a.button:active { +button:active, .button:active, a.button:active { text-decoration:none; background:#6a7b42; border:1px solid #487328; diff --git a/src/Orchard/Environment/DefaultOrchardShell.cs b/src/Orchard/Environment/DefaultOrchardShell.cs index 0a15f036f..4fb56e480 100644 --- a/src/Orchard/Environment/DefaultOrchardShell.cs +++ b/src/Orchard/Environment/DefaultOrchardShell.cs @@ -56,12 +56,14 @@ namespace Orchard.Environment { var appBuilder = new AppBuilder(); appBuilder.Properties["host.AppName"] = _shellSettings.Name; - var orderedMiddlewares = _owinMiddlewareProviders - .SelectMany(p => p.GetOwinMiddlewares()) - .OrderBy(obj => obj.Priority, new FlatPositionComparer()); + using (var scope = _workContextAccessor.CreateWorkContextScope()) { + var orderedMiddlewares = _owinMiddlewareProviders + .SelectMany(p => p.GetOwinMiddlewares()) + .OrderBy(obj => obj.Priority, new FlatPositionComparer()); - foreach (var middleware in orderedMiddlewares) { - middleware.Configure(appBuilder); + foreach (var middleware in orderedMiddlewares) { + middleware.Configure(appBuilder); + } } // Register the Orchard middleware after all others.