mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.ContentManagement.ViewModels;
|
||||
using Orchard.Data;
|
||||
using Orchard.Media.Models;
|
||||
|
||||
@@ -17,22 +15,5 @@ namespace Orchard.Media.Handlers {
|
||||
private static void DefaultSettings(ActivatedContentContext context, MediaSettings settings) {
|
||||
settings.Record.RootMediaFolder = "~/Media";
|
||||
}
|
||||
|
||||
protected override void BuildEditorModel(BuildEditorModelContext context) {
|
||||
var model = context.ContentItem.As<MediaSettings>();
|
||||
if (model == null)
|
||||
return;
|
||||
|
||||
context.AddEditor(new TemplateViewModel(model.Record, "MediaSettings") { TemplateName = "Parts/Media.SiteSettings" });
|
||||
}
|
||||
|
||||
protected override void UpdateEditorModel(UpdateEditorModelContext context) {
|
||||
var model = context.ContentItem.As<MediaSettings>();
|
||||
if (model == null)
|
||||
return;
|
||||
|
||||
context.Updater.TryUpdateModel(model.Record, "MediaSettings", null, null);
|
||||
context.AddEditor(new TemplateViewModel(model.Record, "MediaSettings") { TemplateName = "Parts/Media.SiteSettings" });
|
||||
}
|
||||
}
|
||||
}
|
@@ -37,7 +37,6 @@ namespace Orchard.Mvc.Html {
|
||||
public string FileName { get; set; }
|
||||
public string Condition { get; set; }
|
||||
public string FilePathAttributeName { get; set; }
|
||||
public IDictionary<string, string> Attributes { get { return _tagBuilder.Attributes; } }
|
||||
|
||||
public void AddAttribute(string name, string value) {
|
||||
_tagBuilder.MergeAttribute(name, value);
|
||||
@@ -68,7 +67,7 @@ namespace Orchard.Mvc.Html {
|
||||
return obj.GetType() == typeof (FileRegistrationContext) && Equals((FileRegistrationContext) obj);
|
||||
}
|
||||
|
||||
public bool Equals(FileRegistrationContext other) {
|
||||
private bool Equals(FileRegistrationContext other) {
|
||||
if (ReferenceEquals(null, other)) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Html;
|
||||
|
Reference in New Issue
Block a user