- Basic persistency for the widget/layer parts.

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-09-29 16:34:24 -07:00
parent b49f3b82ce
commit 268989dad8
3 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
using JetBrains.Annotations;
using Orchard.ContentManagement.Handlers;
using Orchard.Data;
using Orchard.Widgets.Models;
namespace Orchard.Widgets.Handlers {
[UsedImplicitly]
public class LayerPartHandler : ContentHandler {
public LayerPartHandler(IRepository<LayerPartRecord> layersRepository) {
Filters.Add(StorageFilter.For(layersRepository));
}
}
}

View File

@@ -0,0 +1,13 @@
using JetBrains.Annotations;
using Orchard.ContentManagement.Handlers;
using Orchard.Data;
using Orchard.Widgets.Models;
namespace Orchard.Widgets.Handlers {
[UsedImplicitly]
public class WidgetPartHandler : ContentHandler {
public WidgetPartHandler(IRepository<WidgetPartRecord> widgetsRepository) {
Filters.Add(StorageFilter.For(widgetsRepository));
}
}
}

View File

@@ -59,6 +59,8 @@
<ItemGroup>
<Compile Include="AdminMenu.cs" />
<Compile Include="Controllers\AdminController.cs" />
<Compile Include="Handlers\LayerPartHandler.cs" />
<Compile Include="Handlers\WidgetPartHandler.cs" />
<Compile Include="Models\Layer.cs" />
<Compile Include="Models\LayerPart.cs" />
<Compile Include="Models\LayerPartRecord.cs" />
@@ -78,7 +80,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Handlers\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">