Merge branch '1.10.x' into dev

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs
#	src/Orchard.Web/Modules/Orchard.Fields/Drivers/LinkFieldDriver.cs
#	src/Orchard.Web/Modules/Orchard.Fields/Drivers/NumericFieldDriver.cs
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Drivers/MediaLibraryPickerFieldDriver.cs
This commit is contained in:
Sipke Schoorstra
2016-10-04 10:35:32 +02:00
26 changed files with 77 additions and 64 deletions

3
.gitignore vendored
View File

@@ -68,6 +68,9 @@ ipch/
_ReSharper*/ _ReSharper*/
*.[Rr]e[Ss]harper *.[Rr]e[Ss]harper
# CodeRush is a .NET coding add-in
.cr*/
# TeamCity is a build add-in # TeamCity is a build add-in
_TeamCity* _TeamCity*

View File

@@ -63,8 +63,8 @@
<span class="hint">@T("Determines whether scripts and stylesheets load in their debuggable or minified form.")</span> <span class="hint">@T("Determines whether scripts and stylesheets load in their debuggable or minified form.")</span>
</div> </div>
<div> <div>
@Html.LabelFor(m => m.UseCdn, T("Use CDN"))
@Html.CheckBoxFor(m => m.UseCdn) @Html.CheckBoxFor(m => m.UseCdn)
@Html.LabelFor(m => m.UseCdn, T("Use CDN").Text, new { @class = "forcheckbox" })
<span class="hint">@T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")</span> <span class="hint">@T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")</span>
</div> </div>
<div> <div>

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement.MetaData; using Orchard.ContentManagement.MetaData;
namespace Orchard.ContentTypes.ViewModels { namespace Orchard.ContentTypes.ViewModels {
@@ -11,19 +10,16 @@ namespace Orchard.ContentTypes.ViewModels {
/// <summary> /// <summary>
/// The technical name of the field /// The technical name of the field
/// </summary> /// </summary>
[Required]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// The display name of the field /// The display name of the field
/// </summary> /// </summary>
[Required]
public string DisplayName { get; set; } public string DisplayName { get; set; }
/// <summary> /// <summary>
/// The selected field type /// The selected field type
/// </summary> /// </summary>
[Required]
public string FieldTypeName { get; set; } public string FieldTypeName { get; set; }
/// <summary> /// <summary>

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement.MetaData; using Orchard.ContentManagement.MetaData;
namespace Orchard.ContentTypes.ViewModels { namespace Orchard.ContentTypes.ViewModels {
@@ -12,7 +11,6 @@ namespace Orchard.ContentTypes.ViewModels {
/// <summary> /// <summary>
/// The display name of the field /// The display name of the field
/// </summary> /// </summary>
[Required]
public string DisplayName { get; set; } public string DisplayName { get; set; }
} }
} }

View File

@@ -4,15 +4,17 @@
Style.Require("ContentTypesAdmin"); Style.Require("ContentTypesAdmin");
Layout.Title = T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString(); Layout.Title = T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString();
var returnUrl = Request.QueryString["returnUrl"];
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()
<fieldset> <fieldset>
<label for="DisplayName">@T("Display Name")</label> <label for="DisplayName" class="required">@T("Display Name")</label>
@Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"}) @Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"})
<span class="hint">@T("Name of the field as it will be displayed in screens.")</span> <span class="hint">@T("Name of the field as it will be displayed in screens.")</span>
<label for="Name">@T("Technical Name")</label> <label for="Name" class="required">@T("Technical Name")</label>
@Html.TextBoxFor(m => m.Name, new {@class = "text"}) @Html.TextBoxFor(m => m.Name, new {@class = "text"})
<span class="hint">@T("Technical name of the field.")</span> <span class="hint">@T("Technical name of the field.")</span>
</fieldset> </fieldset>
@@ -22,6 +24,9 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<button class="primaryAction" type="submit">@T("Save")</button> <button class="primaryAction" type="submit">@T("Save")</button>
@if (!String.IsNullOrWhiteSpace(returnUrl) && Request.IsLocalUrl(returnUrl)) {
<a id="button-cancel" href="@returnUrl" class="button">@T("Cancel")</a>
}
</fieldset> </fieldset>
} }

View File

@@ -1,8 +1,10 @@
@using Orchard.Utility.Extensions;
@model Orchard.ContentTypes.ViewModels.EditTypeViewModel @model Orchard.ContentTypes.ViewModels.EditTypeViewModel
@{ @{
Style.Require("ContentTypesAdmin"); Style.Require("ContentTypesAdmin");
Script.Require("jQuery"); Script.Require("jQuery");
Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text; Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
} }
<div class="manage"> <div class="manage">
@@ -27,7 +29,7 @@
<div class="manage-type"> <div class="manage-type">
<h2>@T("Fields")</h2> <h2>@T("Fields")</h2>
<div class="manage add-to-type"> <div class="manage add-to-type">
@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" })
</div> </div>
@Html.EditorFor(m => m.Fields, "Fields", "") @Html.EditorFor(m => m.Fields, "Fields", "")
<h2>@T("Parts")</h2> <h2>@T("Parts")</h2>

View File

@@ -4,12 +4,14 @@
Style.Require("ContentTypesAdmin"); Style.Require("ContentTypesAdmin");
Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString(); Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString();
var returnUrl = Request.QueryString["returnUrl"];
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()
<fieldset> <fieldset>
<label for="DisplayName">@T("Display Name")</label> <label for="DisplayName" class="required">@T("Display Name")</label>
@Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"}) @Html.TextBoxFor(m => m.DisplayName, new {@class = "text medium", autofocus = "autofocus"})
<span class="hint">@T("Name of the field as it will be displayed in screens.")</span> <span class="hint">@T("Name of the field as it will be displayed in screens.")</span>
@@ -17,5 +19,8 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<button class="primaryAction" type="submit" name="submit.Save" value="Save">@T("Save")</button> <button class="primaryAction" type="submit" name="submit.Save" value="Save">@T("Save")</button>
@if (!String.IsNullOrWhiteSpace(returnUrl) && Request.IsLocalUrl(returnUrl)) {
<a id="button-cancel" href="@returnUrl" class="button">@T("Cancel")</a>
}
</fieldset> </fieldset>
} }

View File

@@ -1,13 +1,16 @@
@using Orchard.Utility.Extensions @using Orchard.Utility.Extensions
@model Orchard.ContentTypes.ViewModels.EditPartFieldViewModel @model Orchard.ContentTypes.ViewModels.EditPartFieldViewModel
<fieldset class="manage-field"> @{
<h3>@Model.DisplayName <span>(@Model.FieldDefinition.Name.CamelFriendly())</span></h3> var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
<div class="manage"> }
@Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }) | <fieldset class="manage-field">
@Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) <h3>@Model.DisplayName <span>(@Model.FieldDefinition.Name.CamelFriendly())</span></h3>
</div> <div class="manage">
<div class="details"> @Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name, returnUrl }) |
@{Html.RenderTemplates(Model.Templates);} @Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" })
@Html.HiddenFor(m => m.Name)@Html.HiddenFor(m => m.FieldDefinition.Name)@Html.HiddenFor(m => m.Index) </div>
</div> <div class="details">
</fieldset> @{Html.RenderTemplates(Model.Templates);}
@Html.HiddenFor(m => m.Name)@Html.HiddenFor(m => m.FieldDefinition.Name)@Html.HiddenFor(m => m.Index)
</div>
</fieldset>

View File

@@ -32,7 +32,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] { "text", "large", "tokenized" }, Classes: new[] { "text", "large" },
Description: T("The value of this checkbox."))); Description: T("The value of this checkbox.")));
return form; return form;

View File

@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] { "text", "medium", "tokenized" }, Classes: new[] { "text", "medium" },
Description: T("The value of this email field."))); Description: T("The value of this email field.")));
return form; return form;

View File

@@ -27,7 +27,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] { "text", "medium", "tokenized" }, Classes: new[] { "text", "medium" },
Description: T("The value of this hidden field."))); Description: T("The value of this hidden field.")));
return form; return form;
@@ -40,7 +40,7 @@ namespace Orchard.DynamicForms.Drivers {
// Allow the initial value to be tokenized. // Allow the initial value to be tokenized.
// If a value was posted, use that value instead (without tokenizing it). // 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 });
} }
} }
} }

View File

@@ -30,7 +30,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] { "text", "large", "tokenized" }, Classes: new[] { "text", "large" },
Description: T("The value of this text area.")), Description: T("The value of this text area.")),
_Rows: shape.Textbox( _Rows: shape.Textbox(
Id: "Rows", Id: "Rows",

View File

@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] { "text", "medium", "tokenized" }, Classes: new[] { "text", "medium" },
Description: T("The value of this text field."))); Description: T("The value of this text field.")));
return form; return form;

View File

@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value", Id: "Value",
Name: "Value", Name: "Value",
Title: "Value", Title: "Value",
Classes: new[] {"text", "medium", "tokenized"}, Classes: new[] { "text", "medium" },
Description: T("The value of this URL field."))); Description: T("The value of this URL field.")));
return form; return form;

View File

@@ -5,7 +5,7 @@
var settings = Model.PartFieldDefinition.Settings.GetModel<BooleanFieldSettings>(); var settings = Model.PartFieldDefinition.Settings.GetModel<BooleanFieldSettings>();
} }
<fieldset> <fieldset>
<label for="@Html.FieldIdFor(m => m.Value)">@Model.DisplayName</label> <label for="@Html.FieldIdFor(m => m.Value)" @if (!settings.Optional) { <text> class="required" </text> }>@Model.DisplayName</label>
@switch (settings.SelectionMode) { @switch (settings.SelectionMode) {
case SelectionMode.Checkbox: case SelectionMode.Checkbox:
<input type="checkbox" id="@(Html.FieldIdFor(m => m.Value))" value="true" name="@Html.FieldNameFor(m => m.Value)" @if(Model.Value.HasValue && Model.Value.Value) { <text>checked="checked"</text> } /><input name="@Html.FieldNameFor(m => m.Value)" type="hidden" value="false" /> <input type="checkbox" id="@(Html.FieldIdFor(m => m.Value))" value="true" name="@Html.FieldNameFor(m => m.Value)" @if(Model.Value.HasValue && Model.Value.Value) { <text>checked="checked"</text> } /><input name="@Html.FieldNameFor(m => m.Value)" type="hidden" value="false" />

View File

@@ -1,4 +1,4 @@
/* Reset /* Reset
***************************************************************/ ***************************************************************/
html, body, div, span, applet, object, iframe, 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)); 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; text-decoration:none;
background:#6a7b42; background:#6a7b42;
border:1px solid #487328; border:1px solid #487328;

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.Mvc; using System.Web.Mvc;
@@ -52,20 +52,18 @@ namespace Orchard.Layouts.Providers {
} }
private IEnumerable<Tuple<ContentPartDefinition, ContentPartFieldDefinition>> GetContentFieldTuples(HarvestElementsContext context) { private IEnumerable<Tuple<ContentPartDefinition, ContentPartFieldDefinition>> GetContentFieldTuples(HarvestElementsContext context) {
var contentTypeDefinition = context.Content != null // If there is no content item provided as context, there are no fields made available.
? _contentDefinitionManager.Value.GetTypeDefinition(context.Content.ContentItem.ContentType) if (context.Content == null)
: default(ContentTypeDefinition); return Enumerable.Empty<Tuple<ContentPartDefinition, ContentPartFieldDefinition>>();
var parts = contentTypeDefinition != null
? contentTypeDefinition.Parts.Select(x => x.PartDefinition)
: _contentDefinitionManager.Value.ListPartDefinitions();
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))); 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. // TODO: Each module should be able to tell which fields are supported as droppable elements.
var blackList = new string[0]; 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) { private void Displaying(ElementDisplayingContext context) {

View File

@@ -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)); 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; text-decoration:none;
background:#6a7b42; background:#6a7b42;
border:1px solid #487328; border:1px solid #487328;

View File

@@ -345,7 +345,7 @@
-ms-text-overflow: ellipsis; -ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
text-overflow: ellipsis; text-overflow: ellipsis;
text-wrap: none; white-space: nowrap;
} }
.media-library-main-list-overlay .publication-status { .media-library-main-list-overlay .publication-status {

View File

@@ -42,7 +42,7 @@
<div class="thumbnail" data-bind="html: data.thumbnail"> <div class="thumbnail" data-bind="html: data.thumbnail">
</div> </div>
<div class="media-library-main-list-overlay"> <div class="media-library-main-list-overlay">
<p class="title" data-bind="text: data.title"></p> <p class="title" data-bind="text: data.title, attr: { title: data.title }"></p>
<p class="publication-status" data-bind="text: publicationStatus"></p> <p class="publication-status" data-bind="text: publicationStatus"></p>
</div> </div>
</li> </li>

View File

@@ -11,13 +11,14 @@
<IsSetupRecipe>true</IsSetupRecipe> <IsSetupRecipe>true</IsSetupRecipe>
</Recipe> </Recipe>
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Alias,Orchard.Autoroute, <Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Tags.TagCloud,Orchard.Alias,Orchard.Autoroute,
XmlRpc,Orchard.Blogs.RemotePublishing,Orchard.ContentPicker, XmlRpc,Orchard.Blogs.RemotePublishing,Orchard.ContentPicker,
TinyMce,Orchard.MediaLibrary,Orchard.PublishLater, TinyMce,Orchard.MediaLibrary,Orchard.PublishLater,
Orchard.Resources,Orchard.Widgets, Orchard.Resources,Orchard.Widgets,Orchard.ContentTypes,
Orchard.Scripting,Orchard.Scripting.Lightweight, Orchard.Scripting,Orchard.Scripting.Lightweight,
PackagingServices,Orchard.Packaging,Orchard.Warmup,Orchard.OutputCache, PackagingServices,Orchard.Packaging,Orchard.Warmup,Orchard.OutputCache,
Orchard.Taxonomies,Orchard.Workflows, Orchard.Taxonomies,Orchard.Workflows,
Orchard.Layouts,Orchard.Fields,
TheThemeMachine" /> TheThemeMachine" />
<ContentDefinition> <ContentDefinition>
@@ -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 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 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" 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 RecentBlogPosts /Title:"Recent Blog Posts" /Zone:"AsideSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"RecentBlogPosts1"
widget create HtmlWidget /Title:"Second Leader Aside" /Zone:"TripelSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget2" /UseLoremIpsumText:true widget create BlogArchives /Title:"Blog Archives" /Zone:"AsideSecond" /Position:"6" /Layer:"TheHomepage" /Identity:"BlogArchives1"
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true widget create TagCloud /Title:"Blog Post Tags" /Zone:"AsideSecond" /Position:"7" /Layer:"TheHomepage" /Identity:"TagCloud1"
site setting set baseurl site setting set baseurl
theme activate "The Theme Machine" theme activate "The Theme Machine"
menu create /MenuName:"Main Menu" menu create /MenuName:"Main Menu"

View File

@@ -39,7 +39,7 @@ namespace Orchard.Tags.Services {
public Localizer T { get; set; } public Localizer T { get; set; }
public IEnumerable<TagRecord> GetTags() { public IEnumerable<TagRecord> GetTags() {
return _tagRepository.Table.ToList(); return _tagRepository.Table.OrderBy(x => x.TagName).ToList();
} }
public IEnumerable<TagRecord> GetTagsByNameSnippet(string snippet, int maxCount = 10) { public IEnumerable<TagRecord> GetTagsByNameSnippet(string snippet, int maxCount = 10) {

View File

@@ -81,7 +81,7 @@ namespace Orchard.Templates.Drivers {
return true; 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; return false;
} }

View File

@@ -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: -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)); 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; text-decoration:none;
background:#6a7b42; background:#6a7b42;
border:1px solid #487328; border:1px solid #487328;

View File

@@ -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)); 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; text-decoration:none;
background:#6a7b42; background:#6a7b42;
border:1px solid #487328; border:1px solid #487328;

View File

@@ -56,12 +56,14 @@ namespace Orchard.Environment {
var appBuilder = new AppBuilder(); var appBuilder = new AppBuilder();
appBuilder.Properties["host.AppName"] = _shellSettings.Name; appBuilder.Properties["host.AppName"] = _shellSettings.Name;
var orderedMiddlewares = _owinMiddlewareProviders using (var scope = _workContextAccessor.CreateWorkContextScope()) {
.SelectMany(p => p.GetOwinMiddlewares()) var orderedMiddlewares = _owinMiddlewareProviders
.OrderBy(obj => obj.Priority, new FlatPositionComparer()); .SelectMany(p => p.GetOwinMiddlewares())
.OrderBy(obj => obj.Priority, new FlatPositionComparer());
foreach (var middleware in orderedMiddlewares) { foreach (var middleware in orderedMiddlewares) {
middleware.Configure(appBuilder); middleware.Configure(appBuilder);
}
} }
// Register the Orchard middleware after all others. // Register the Orchard middleware after all others.