Skip to content

Commit a47fa4e

Browse files
committed
Template project-ised Mvc.JQuery.Datatables.Example
1 parent 5cf5dd3 commit a47fa4e

30 files changed

+244
-776
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Reflection;
2+
using System.Linq;
3+
namespace Mvc.JQuery.Datatables.Example.App_Code
4+
{
5+
public class RegisterVirtualPathProvider
6+
{
7+
public static void AppInitialize()
8+
{
9+
System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new EmbeddedResourceVirtualPathProvider.Vpp()
10+
{
11+
{typeof(Mvc.JQuery.Datatables.DataTableVm).Assembly, @"..\Mvc.JQuery.Datatables"}
12+
});
13+
}
14+
}
15+
}

Mvc.JQuery.Datatables.Example/Mvc.JQuery.Datatables.Example.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
3636
<ItemGroup>
37+
<Reference Include="EmbeddedResourceVirtualPathProvider">
38+
<HintPath>..\packages\EmbeddedResourceVirtualPathProvider.1.2.5\lib\net40\EmbeddedResourceVirtualPathProvider.dll</HintPath>
39+
</Reference>
3740
<Reference Include="EntityFramework">
3841
<HintPath>..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll</HintPath>
3942
</Reference>
@@ -69,6 +72,7 @@
6972
</Reference>
7073
</ItemGroup>
7174
<ItemGroup>
75+
<Content Include="App_Code\RegisterVirtualPathProvider.cs" />
7276
<Compile Include="App_Start\RegisterDatatablesModelBinder.cs" />
7377
<Compile Include="Controllers\HomeController.cs" />
7478
<Compile Include="Global.asax.cs">
@@ -272,7 +276,6 @@
272276
<Content Include="Scripts\jquery-ui-1.8.11.min.js" />
273277
<Content Include="Scripts\jquery-ui-1.8.17.js" />
274278
<Content Include="Scripts\jquery-ui-1.8.17.min.js" />
275-
<Content Include="Scripts\jquery.dataTables.columnFilter.js" />
276279
<Content Include="Scripts\jquery.validate-vsdoc.js" />
277280
<Content Include="Scripts\jquery.validate.js" />
278281
<Content Include="Scripts\jquery.validate.min.js" />
@@ -351,7 +354,6 @@
351354
<None Include="Scripts\DataTables-1.9.0\extras\FixedColumns\media\js\FixedColumns.min.js.gz" />
352355
<None Include="Scripts\DataTables-1.9.0\extras\Scroller\media\js\Scroller.min.js.gz" />
353356
<None Include="Scripts\DataTables-1.9.0\extras\TableTools\media\js\TableTools.min.js.gz" />
354-
<Content Include="Views\Shared\DataTable.cshtml" />
355357
</ItemGroup>
356358
<ItemGroup>
357359
<ProjectReference Include="..\Mvc.JQuery.Datatables\Mvc.JQuery.Datatables.csproj">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/Housekeeping/ProjectSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

Mvc.JQuery.Datatables.Example/Web.config

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
</appSettings>
1212
<system.web>
1313
<globalization culture="auto" uiCulture="auto" enableClientBasedCulture="true" />
14-
1514
<compilation debug="true" targetFramework="4.0">
1615
<assemblies>
1716
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
@@ -39,6 +38,12 @@
3938
<system.webServer>
4039
<validation validateIntegratedModeConfiguration="false" />
4140
<modules runAllManagedModulesForAllRequests="true" />
41+
<handlers>
42+
<add verb="GET" path="*.js" name="Static for js" type="System.Web.StaticFileHandler" />
43+
<add verb="GET" path="*.css" name="Static for css" type="System.Web.StaticFileHandler" />
44+
<add verb="GET" path="*.png" name="Static for png" type="System.Web.StaticFileHandler" />
45+
<add verb="GET" path="*.jpg" name="Static for jpg" type="System.Web.StaticFileHandler" />
46+
</handlers>
4247
</system.webServer>
4348
<runtime>
4449
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

Mvc.JQuery.Datatables.Example/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="AristojQueryUITheme" version="1.2" />
4+
<package id="EmbeddedResourceVirtualPathProvider" version="1.2.5" />
45
<package id="EntityFramework" version="4.1.10331.0" />
56
<package id="jQuery" version="1.5.1" />
67
<package id="jQuery" version="1.4.4" />
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Mvc.JQuery.Datatables.Templates
2+
{
3+
public class Marker
4+
{
5+
}
6+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{8DA3D5E6-D714-40C3-B6CB-E88D852C5175}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Mvc.JQuery.Datatables.Templates</RootNamespace>
12+
<AssemblyName>Mvc.JQuery.Datatables.Templates</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Core" />
36+
<Reference Include="System.Xml.Linq" />
37+
<Reference Include="System.Data.DataSetExtensions" />
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Xml" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="Marker.cs" />
44+
<Compile Include="Properties\AssemblyInfo.cs" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<None Include="Views\Web.config" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<Content Include="Scripts\jquery.dataTables.columnFilter.js" />
51+
<Content Include="Views\Shared\DataTable.cshtml" />
52+
</ItemGroup>
53+
<ItemGroup />
54+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
55+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
56+
Other similar extension points exist, see Microsoft.Common.targets.
57+
<Target Name="BeforeBuild">
58+
</Target>
59+
<Target Name="AfterBuild">
60+
</Target>
61+
-->
62+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/Housekeeping/ProjectSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Mvc.JQuery.Datatables.Templates")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("Microsoft")]
12+
[assembly: AssemblyProduct("Mvc.JQuery.Datatables.Templates")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("3a1615c1-4f8f-4cea-8bc5-844b23ef7073")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Mvc.JQuery.Datatables.Example/Scripts/jquery.dataTables.columnFilter.js renamed to Mvc.JQuery.Datatables.Templates/Scripts/jquery.dataTables.columnFilter.js

File renamed without changes.

0 commit comments

Comments
 (0)