Small update to not weld a content type's (implicit) part on twice

Also updated the Orchard.ContentTypes proj to not spin up cassini

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-06-28 13:22:34 -07:00
parent 0a38ebc8c4
commit 6d310fe3f1
3 changed files with 8 additions and 11 deletions

View File

@@ -109,7 +109,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Helpers\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
@@ -137,9 +136,8 @@
<IISUrl>
</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using Orchard.ContentManagement.Handlers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Models;
namespace Orchard.ContentManagement.Drivers {
public abstract class ContentFieldDriver<TField> : IContentFieldDriver where TField : ContentField, new() {
@@ -15,7 +14,7 @@ namespace Orchard.ContentManagement.Drivers {
}
DriverResult IContentFieldDriver.BuildEditorModel(BuildEditorModelContext context) {
return Process(context.ContentItem, (part, field) => Editor(part, field));
return Process(context.ContentItem, Editor);
}
DriverResult IContentFieldDriver.UpdateEditorModel(UpdateEditorModelContext context) {

View File

@@ -26,12 +26,12 @@ namespace Orchard.ContentManagement.Handlers {
typePartDefinition = new ContentTypeDefinition.Part(
new ContentPartDefinition(partName),
new SettingsDictionary());
}
var part = new TPart {
TypePartDefinition = typePartDefinition
};
_item.Weld(part);
var part = new TPart {
TypePartDefinition = typePartDefinition
};
_item.Weld(part);
}
return this;
}