mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
115 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b96882ee3b | ||
|
|
ac6620c972 | ||
|
|
c61f4df3b6 | ||
|
|
bf0f1b1b94 | ||
|
|
49b7215469 | ||
|
|
daf188c57e | ||
|
|
d60af14ac6 | ||
|
|
4348ea4293 | ||
|
|
550c10de79 | ||
|
|
73cecd0d64 | ||
|
|
2a054f3ac4 | ||
|
|
080eabf1b5 | ||
|
|
7648d4f320 | ||
|
|
f169550ec3 | ||
|
|
1b5c3f65e5 | ||
|
|
9542bf47d0 | ||
|
|
8158f06133 | ||
|
|
190293551c | ||
|
|
769bf86931 | ||
|
|
0cd5a0a641 | ||
|
|
df1f3b6071 | ||
|
|
7972fe9358 | ||
|
|
8afff049d3 | ||
|
|
8468b2fb4e | ||
|
|
f9f5af6534 | ||
|
|
cc106d8a51 | ||
|
|
b8031b68bd | ||
|
|
2f724c5239 | ||
|
|
3338bb4d40 | ||
|
|
2bb74fb42b | ||
|
|
ff9b8078fb | ||
|
|
92f2707a02 | ||
|
|
af4baff455 | ||
|
|
82f040d9f3 | ||
|
|
51fd4b4364 | ||
|
|
ab2409e38e | ||
|
|
ab0b8b095d | ||
|
|
89118483e3 | ||
|
|
c5f32cfc84 | ||
|
|
01caf36547 | ||
|
|
75ab94816d | ||
|
|
32bf7dfe41 | ||
|
|
5750f68b19 | ||
|
|
743952b418 | ||
|
|
76feb43da2 | ||
|
|
0e2a3ac617 | ||
|
|
39dedd61e7 | ||
|
|
0690cc53d4 | ||
|
|
4398c259e6 | ||
|
|
400be1dfb5 | ||
|
|
12e54a5ab6 | ||
|
|
74322902ec | ||
|
|
dbdf3e16bf | ||
|
|
6a63b6dfc5 | ||
|
|
f73b259894 | ||
|
|
32b6cf8ce0 | ||
|
|
893f88a9c0 | ||
|
|
aa9262b35b | ||
|
|
bd5e4a823f | ||
|
|
f1e6b70eae | ||
|
|
35de8f80be | ||
|
|
01ec06695d | ||
|
|
8f3bb8eeca | ||
|
|
6db862c951 | ||
|
|
326c8df745 | ||
|
|
17b07cb4a1 | ||
|
|
3fcc9bdefd | ||
|
|
88e8037a5f | ||
|
|
4eccc44b6b | ||
|
|
b1ba6d1ada | ||
|
|
03fb3b4baf | ||
|
|
e623bf8d0b | ||
|
|
c2faf0152f | ||
|
|
a0cd5cad7e | ||
|
|
6ed1b88f17 | ||
|
|
9226f2f008 | ||
|
|
06108f3474 | ||
|
|
e27144fec7 | ||
|
|
43ce029cab | ||
|
|
2c25bb243d | ||
|
|
f9e75c648f | ||
|
|
6b36a256b0 | ||
|
|
4954f3a781 | ||
|
|
dd19aed5af | ||
|
|
9dd013555a | ||
|
|
46ce40359c | ||
|
|
5d56833af4 | ||
|
|
4c67b6e831 | ||
|
|
1e8089ac49 | ||
|
|
3fdd48033d | ||
|
|
db685df5fc | ||
|
|
427799c78b | ||
|
|
8e370c7df0 | ||
|
|
013061803f | ||
|
|
2a2d44c226 | ||
|
|
75eea6b901 | ||
|
|
26a5ca83b7 | ||
|
|
299a7cdf5b | ||
|
|
8350c5bcc7 | ||
|
|
de74251ac7 | ||
|
|
c42e0cbaa1 | ||
|
|
6a4779a421 | ||
|
|
b7ad2c9e3c | ||
|
|
98f264a5e7 | ||
|
|
3dfda4aa2c | ||
|
|
0e078efcb8 | ||
|
|
866dd83de0 | ||
|
|
4dd9d03d7a | ||
|
|
310418d2f9 | ||
|
|
a361ad263e | ||
|
|
4d5ef16ee0 | ||
|
|
8e60dc1179 | ||
|
|
668338b384 | ||
|
|
39ba3e1ac1 | ||
|
|
4a95f697dd |
16
.hgsub
16
.hgsub
@@ -1,9 +1,9 @@
|
||||
|
||||
src/Orchard.Web/Modules/Orchard.Forms = https://hg01.codeplex.com/orchardforms
|
||||
src/Orchard.Web/Modules/Orchard.Rules = https://hg01.codeplex.com/orchardrules
|
||||
src/Orchard.Web/Modules/Orchard.Tokens = https://hg01.codeplex.com/orchardtokens
|
||||
src/Orchard.Web/Modules/Orchard.TaskLease = https://hg01.codeplex.com/orchardtasklease
|
||||
src/orchard.web/modules/Orchard.Fields = https://hg01.codeplex.com/orchardfields
|
||||
src/Orchard.Web/Modules/Orchard.Autoroute = https://hg01.codeplex.com/orchardautoroute
|
||||
src/orchard.web/Modules/Orchard.Alias = https://hg01.codeplex.com/orchardalias
|
||||
src/orchard.web/Modules/Orchard.Projections = https://hg01.codeplex.com/orchardprojections
|
||||
src/Orchard.Web/Modules/Orchard.Forms = https://hg.codeplex.com/orchardforms
|
||||
src/Orchard.Web/Modules/Orchard.Rules = https://hg.codeplex.com/orchardrules
|
||||
src/Orchard.Web/Modules/Orchard.Tokens = https://hg.codeplex.com/orchardtokens
|
||||
src/Orchard.Web/Modules/Orchard.TaskLease = https://hg.codeplex.com/orchardtasklease
|
||||
src/orchard.web/modules/Orchard.Fields = https://hg.codeplex.com/orchardfields
|
||||
src/Orchard.Web/Modules/Orchard.Autoroute = https://hg.codeplex.com/orchardautoroute
|
||||
src/orchard.web/Modules/Orchard.Alias = https://hg.codeplex.com/orchardalias
|
||||
src/orchard.web/Modules/Orchard.Projections = https://hg.codeplex.com/orchardprojections
|
||||
16
.hgsubstate
16
.hgsubstate
@@ -1,8 +1,8 @@
|
||||
aa41eccbfa3f1a732ec1a40ea8e49bfe74d572d6 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
1f316804967aea8eebbab1bb343bb44d96a368b8 src/Orchard.Web/Modules/Orchard.Forms
|
||||
7a1553d61ec49f709395a409a8edfe0956ab991c src/Orchard.Web/Modules/Orchard.Rules
|
||||
dab42f20280f46c25c6c78ef13870f9a063bd026 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
be23bc6a94083f899ecb70bf75abd006b5ed4ad1 src/Orchard.Web/Modules/Orchard.Tokens
|
||||
88a640948e19a1a9dd79b859856375e292d53f2f src/orchard.web/Modules/Orchard.Alias
|
||||
1a10722acaf9dacbc1d14125b18314694715de5c src/orchard.web/Modules/Orchard.Projections
|
||||
75d747674d00087b2bd7298ac1f78c8b7e2a0124 src/orchard.web/modules/Orchard.Fields
|
||||
bf20391f8fe1ba5d67cadc0643d79ad9fe892d4e src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
e7fc05ff6137ed5459d198b2bea9a5804818b0bd src/Orchard.Web/Modules/Orchard.Forms
|
||||
681acdfadd946098a10a4a22f6904e8c482c122f src/Orchard.Web/Modules/Orchard.Rules
|
||||
419399ef2e37122a000e6cc8674148d3183d7032 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
fc63ee29cb68eaa02e3b406c42502346b85221f8 src/Orchard.Web/Modules/Orchard.Tokens
|
||||
4ed51e0e76c2aacc2de90ce9984fd00cfdfae2ce src/orchard.web/Modules/Orchard.Alias
|
||||
f5353e9e0f678d396735df6eb6ca3c7f30a09660 src/orchard.web/Modules/Orchard.Projections
|
||||
4d125be1a6b35451214768cd8e46b6e7e2b08174 src/orchard.web/modules/Orchard.Fields
|
||||
|
||||
3
.hgtags
3
.hgtags
@@ -23,3 +23,6 @@ e1ec47d08d85c6da922fc6fe74bb663264fd20fc 1.2
|
||||
2ca8b2e7914c82faa4e05eb11a99a21feded85a0 1.2
|
||||
8732e2734cd26dca85c2018726a039771b6431b5 1.3
|
||||
0b91d3e737b82a6ddfe872446e25848ae531fc40 1.4
|
||||
0b91d3e737b82a6ddfe872446e25848ae531fc40 1.4
|
||||
cfc1cec81fee0b1e1016bf27b5775467eb250839 1.4
|
||||
8ed0034d0b454586ed6943a5099f6a91934c4330 1.4.1
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
if "%WindowsSdkDir%" neq "" goto build
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8on64
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
|
||||
echo "Unable to detect suitable environment. Build may not succeed."
|
||||
goto build
|
||||
|
||||
@@ -14,6 +16,13 @@ goto build
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:initialize2k8Dev11
|
||||
call "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:initialize2k8on64Dev11
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:build
|
||||
call build
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
if "%WindowsSdkDir%" neq "" goto build
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8on64
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
|
||||
echo "Unable to detect suitable environment. Build may not succeed."
|
||||
goto build
|
||||
|
||||
@@ -14,6 +15,13 @@ goto build
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:initialize2k8Dev11
|
||||
call "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:initialize2k8on64Dev11
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
|
||||
goto build
|
||||
|
||||
:build
|
||||
msbuild /t:Build AzurePackage.proj
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
<Stage-Modules-Binaries Include="$(WebSitesFolder)\**\bin\**\*" Exclude="@(Stage-Module-Exclude)"/>
|
||||
<Stage-Modules-Sources Include="$(ModulesSrcFolder)\**\*.csproj;$(ModulesSrcFolder)\**\*.cs"/>
|
||||
<Stage-License Include="$(MSBuildProjectDirectory)\*.txt" />
|
||||
<Stage-Build Include="$(MSBuildProjectDirectory)\*.proj;$(MSBuildProjectDirectory)\*.cmd" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Copying module binaries is somewhat tricky: From a module "bin" directory, we
|
||||
@@ -187,7 +188,7 @@
|
||||
<FilterModuleBinaries
|
||||
ModulesBinaries="@(Stage-Themes-Binaries)"
|
||||
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
|
||||
<Output TaskParameter="ExcludedBinaries" ItemName="FilterModuleBinaries-ExcludedBinariesFromThemes"/>
|
||||
<Output TaskParameter="ExcludedBinaries" ItemName="FilterThemeBinaries-ExcludedBinariesFromThemes"/>
|
||||
</FilterModuleBinaries>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -310,7 +311,8 @@
|
||||
$(MSBuildProjectDirectory)\**\*.suo;
|
||||
$(MSBuildProjectDirectory)\**\*.user;
|
||||
$(MSBuildProjectDirectory)\**\*.patch;
|
||||
$(MSBuildProjectDirectory)\**\*.hg;
|
||||
$(MSBuildProjectDirectory)\**\*.hg*\**\*;
|
||||
$(LibFolder)\nunit\addins\**\*;
|
||||
" />
|
||||
|
||||
<Zip-Stage Include="$(StageFolder)\**\*" />
|
||||
@@ -321,6 +323,8 @@
|
||||
$(MSBuildProjectDirectory)\lib\**\*;
|
||||
$(MSBuildProjectDirectory)\src\**\*;
|
||||
$(MSBuildProjectDirectory)\*.txt;
|
||||
$(MSBuildProjectDirectory)\*.proj;
|
||||
$(MSBuildProjectDirectory)\*.cmd;
|
||||
" Exclude="@(Zip-Exclude)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
Binary file not shown.
BIN
lib/autofac/Autofac.Integration.Mef.dll
Normal file
BIN
lib/autofac/Autofac.Integration.Mef.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -264,6 +264,52 @@
|
||||
<param name="lifetimeScopeTag">Tag applied to matching lifetime scopes.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.IRegistrationBuilder`3.InstancePerOwned``1">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<typeparam name="TService">Service type.</typeparam>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.IRegistrationBuilder`3.InstancePerOwned(System.Type)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<param name="serviceType">Service type.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.IRegistrationBuilder`3.InstancePerOwned``1(System.Object)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<typeparam name="TService">The service type provided by the component.</typeparam>
|
||||
<param name="serviceKey">Key to associate with the component.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.IRegistrationBuilder`3.InstancePerOwned(System.Object,System.Type)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<param name="serviceKey">Key to associate with the component.</param>
|
||||
<param name="serviceType">The service type provided by the component.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.IRegistrationBuilder`3.As``1">
|
||||
<summary>
|
||||
Configure the services that the component will provide. The generic parameter(s) to As()
|
||||
@@ -4172,6 +4218,52 @@
|
||||
<param name="lifetimeScopeTag">Tag applied to matching lifetime scopes.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.RegistrationBuilder`3.InstancePerOwned``1">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<typeparam name="TService">The service type provided by the component.</typeparam>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.RegistrationBuilder`3.InstancePerOwned(System.Type)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<param name="serviceType">The service type provided by the component.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.RegistrationBuilder`3.InstancePerOwned``1(System.Object)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<typeparam name="TService">The service type provided by the component.</typeparam>
|
||||
<param name="serviceKey">Key to associate with the component.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.RegistrationBuilder`3.InstancePerOwned(System.Object,System.Type)">
|
||||
<summary>
|
||||
Configure the component so that every dependent component or call to Resolve()
|
||||
within a ILifetimeScope created by an owned instance gets the same, shared instance.
|
||||
Dependent components in lifetime scopes that are children of the owned instance scope will
|
||||
share the parent's instance. If no appropriate owned instance scope can be found in the
|
||||
hierarchy an <see cref="T:Autofac.Core.DependencyResolutionException"/> is thrown.
|
||||
</summary>
|
||||
<param name="serviceKey">Key to associate with the component.</param>
|
||||
<param name="serviceType">The service type provided by the component.</param>
|
||||
<returns>A registration builder allowing further configuration of the component.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Builder.RegistrationBuilder`3.As``1">
|
||||
<summary>
|
||||
Configure the services that the component will provide. The generic parameter(s) to As()
|
||||
|
||||
Binary file not shown.
@@ -137,7 +137,7 @@ namespace Orchard.Azure {
|
||||
|
||||
if (!Container.DirectoryExists(String.Concat(_root, path)) ) {
|
||||
try {
|
||||
CreateFolder(String.Concat(_root, path));
|
||||
CreateFolder(path);
|
||||
}
|
||||
catch ( Exception ex ) {
|
||||
throw new ArgumentException(string.Format("The folder could not be created at path: {0}. {1}",
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Orchard.Specs.Bindings {
|
||||
webApp.GivenIHaveACleanSiteWith(
|
||||
virtualDirectory,
|
||||
TableData(
|
||||
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Lists, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Tokens, Orchard.Autoroute" },
|
||||
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields" },
|
||||
new { extension = "Core", names = "Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
|
||||
|
||||
39
src/Orchard.Specs/Bindings/Settings.cs
Normal file
39
src/Orchard.Specs/Bindings/Settings.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents;
|
||||
using Orchard.Data;
|
||||
using Orchard.Roles.Models;
|
||||
using Orchard.Roles.Services;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.Specs.Hosting.Orchard.Web;
|
||||
using TechTalk.SpecFlow;
|
||||
using Orchard.Localization.Services;
|
||||
using System.Linq;
|
||||
|
||||
namespace Orchard.Specs.Bindings {
|
||||
[Binding]
|
||||
public class Settings : BindingBase {
|
||||
|
||||
[When(@"I have ""(.*)"" as the default culture")]
|
||||
public void DefineDefaultCulture(string cultureName) {
|
||||
|
||||
var webApp = Binding<WebAppHosting>();
|
||||
webApp.Host.Execute(() => {
|
||||
using ( var environment = MvcApplication.CreateStandaloneEnvironment("Default") ) {
|
||||
var orchardServices = environment.Resolve<IOrchardServices>();
|
||||
var cultureManager = environment.Resolve<ICultureManager>();
|
||||
|
||||
var currentCultures = cultureManager.ListCultures();
|
||||
if (!currentCultures.Contains(cultureName)) {
|
||||
cultureManager.AddCulture(cultureName);
|
||||
}
|
||||
|
||||
orchardServices.WorkContext.CurrentSite.SiteCulture = cultureName;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,6 +176,10 @@ namespace Orchard.Specs.Bindings {
|
||||
WhenIGoTo(urlPath);
|
||||
}
|
||||
|
||||
[Given(@"I have the file ""(.*)"" in ""(.*)""")]
|
||||
public void GivenIHaveFile(string sourceFileName, string destination) {
|
||||
Host.CopyFile(sourceFileName, destination);
|
||||
}
|
||||
|
||||
[When(@"I go to ""(.*)"" on host (.*)")]
|
||||
public void WhenIGoToPathOnHost(string urlPath, string host) {
|
||||
|
||||
@@ -214,6 +214,33 @@ namespace Orchard.Specs.Hosting {
|
||||
sourceModule.Combine("Views").DeepCopy(targetModule.Combine("Views"));
|
||||
}
|
||||
|
||||
public void CopyFile(string source, string destination) {
|
||||
|
||||
StackTrace st = new StackTrace(true);
|
||||
Path origin = null;
|
||||
foreach(var sf in st.GetFrames()) {
|
||||
var sourceFile = sf.GetFileName();
|
||||
if(String.IsNullOrEmpty(sourceFile)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var testOrigin = Path.Get(sourceFile).Parent.Combine(source);
|
||||
if(testOrigin.Exists) {
|
||||
origin = testOrigin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(origin == null) {
|
||||
throw new FileNotFoundException("File not found: " + source);
|
||||
}
|
||||
|
||||
var target = _tempSite.Combine(destination);
|
||||
|
||||
Directory.CreateDirectory(target.DirectoryName);
|
||||
File.Copy(origin, target);
|
||||
}
|
||||
|
||||
private bool IsExtensionBinaryFile(Path path, string extensionName, ExtensionDeploymentOptions deploymentOptions) {
|
||||
bool isValidExtension = IsAssemblyFile(path);
|
||||
if (!isValidExtension)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
Scenario: I can create a new list
|
||||
Given I have installed Orchard
|
||||
And I have installed "Orchard.Lists"
|
||||
When I go to "Admin/Contents/Create/List"
|
||||
And I fill in
|
||||
| name | value |
|
||||
@@ -15,6 +16,7 @@ Scenario: I can create a new list
|
||||
|
||||
Scenario: I can add content items to a list
|
||||
Given I have installed Orchard
|
||||
And I have installed "Orchard.Lists"
|
||||
And I have a containable content type "MyType"
|
||||
When I go to "Admin/Contents/Create/List"
|
||||
And I fill in
|
||||
|
||||
52
src/Orchard.Specs/Lists.feature.cs
generated
52
src/Orchard.Specs/Lists.feature.cs
generated
@@ -75,6 +75,8 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#line 7
|
||||
testRunner.Given("I have installed Orchard");
|
||||
#line 8
|
||||
testRunner.And("I have installed \"Orchard.Lists\"");
|
||||
#line 9
|
||||
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
@@ -83,13 +85,13 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table1.AddRow(new string[] {
|
||||
"Title.Title",
|
||||
"MyList"});
|
||||
#line 9
|
||||
#line 10
|
||||
testRunner.And("I fill in", ((string)(null)), table1);
|
||||
#line 12
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 13
|
||||
testRunner.And("I go to \"Admin/Contents/List/List\"");
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 14
|
||||
testRunner.And("I go to \"Admin/Contents/List/List\"");
|
||||
#line 15
|
||||
testRunner.Then("I should see \"MyList\"");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
@@ -100,13 +102,15 @@ this.ScenarioSetup(scenarioInfo);
|
||||
public virtual void ICanAddContentItemsToAList()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can add content items to a list", ((string[])(null)));
|
||||
#line 16
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 17
|
||||
testRunner.Given("I have installed Orchard");
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 18
|
||||
testRunner.And("I have a containable content type \"MyType\"");
|
||||
testRunner.Given("I have installed Orchard");
|
||||
#line 19
|
||||
testRunner.And("I have installed \"Orchard.Lists\"");
|
||||
#line 20
|
||||
testRunner.And("I have a containable content type \"MyType\"");
|
||||
#line 21
|
||||
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
@@ -115,23 +119,23 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table2.AddRow(new string[] {
|
||||
"Title.Title",
|
||||
"MyList"});
|
||||
#line 20
|
||||
#line 22
|
||||
testRunner.And("I fill in", ((string)(null)), table2);
|
||||
#line 23
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 24
|
||||
testRunner.And("I go to \"Admin/Contents/List/List\"");
|
||||
#line 25
|
||||
testRunner.Then("I should see \"MyList\"");
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 26
|
||||
testRunner.When("I follow \"Contained Items\"");
|
||||
testRunner.And("I go to \"Admin/Contents/List/List\"");
|
||||
#line 27
|
||||
testRunner.Then("I should see \"The \'MyList\' List has no content items.\"");
|
||||
testRunner.Then("I should see \"MyList\"");
|
||||
#line 28
|
||||
testRunner.When("I follow \"Create New Content\" where href has \"ReturnUrl\"");
|
||||
testRunner.When("I follow \"Contained Items\"");
|
||||
#line 29
|
||||
testRunner.Then("I should see \"MyType\"");
|
||||
testRunner.Then("I should see \"The \'MyList\' List has no content items.\"");
|
||||
#line 30
|
||||
testRunner.When("I follow \"Create New Content\" where href has \"ReturnUrl\"");
|
||||
#line 31
|
||||
testRunner.Then("I should see \"MyType\"");
|
||||
#line 32
|
||||
testRunner.When("I follow \"MyType\" where href has \"ReturnUrl\"");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
@@ -140,15 +144,15 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table3.AddRow(new string[] {
|
||||
"Title.Title",
|
||||
"MyContentItem"});
|
||||
#line 31
|
||||
#line 33
|
||||
testRunner.And("I fill in", ((string)(null)), table3);
|
||||
#line 34
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 35
|
||||
testRunner.And("I am redirected");
|
||||
#line 36
|
||||
testRunner.Then("I should see \"Manage MyList\"");
|
||||
testRunner.And("I hit \"Save\"");
|
||||
#line 37
|
||||
testRunner.And("I am redirected");
|
||||
#line 38
|
||||
testRunner.Then("I should see \"Manage MyList\"");
|
||||
#line 39
|
||||
testRunner.And("I should see \"MyContentItem\"");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
<Compile Include="Bindings\BindingBase.cs" />
|
||||
<Compile Include="Bindings\CommandLine.cs" />
|
||||
<Compile Include="Bindings\ContentRights.cs" />
|
||||
<Compile Include="Bindings\Settings.cs" />
|
||||
<Compile Include="Bindings\HtmlNodeExtensions.cs" />
|
||||
<Compile Include="Bindings\OrchardSiteFactory.cs" />
|
||||
<Compile Include="Bindings\UsersPermissionsAndRoles.cs" />
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -39,9 +39,9 @@ Scenario: Some of the initial form values are required
|
||||
Scenario: Calling setup on a brand new install
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Autoroute, Orchard.Tokens, Orchard.Alias |
|
||||
| Core | Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode, TheThemeMachine |
|
||||
| Module | Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode, TheAdmin, TheThemeMachine |
|
||||
And I am on "/Setup"
|
||||
When I fill in
|
||||
| name | value |
|
||||
|
||||
6
src/Orchard.Specs/Setup.feature.cs
generated
6
src/Orchard.Specs/Setup.feature.cs
generated
@@ -188,14 +188,14 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"names"});
|
||||
table4.AddRow(new string[] {
|
||||
"Module",
|
||||
@"Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Autoroute, Orchard.Tokens, Orchard.Alias"});
|
||||
@"Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields"});
|
||||
table4.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings," +
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table4.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode, TheThemeMachine"});
|
||||
"SafeMode, TheAdmin, TheThemeMachine"});
|
||||
#line 40
|
||||
testRunner.Given("I have a clean site with", ((string)(null)), table4);
|
||||
#line 45
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
|
||||
}
|
||||
|
||||
_contentManager.Flush();
|
||||
Assert.That(_commentService.GetComments().Count(), Is.EqualTo(12));
|
||||
}
|
||||
|
||||
@@ -180,11 +181,15 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
commentIds[i] = commentedItem.As<CommentPart>().Id;
|
||||
}
|
||||
|
||||
_contentManager.Flush();
|
||||
Assert.That(_commentService.GetComments().Count(), Is.EqualTo(12));
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
_commentService.DeleteComment(commentIds[i]);
|
||||
}
|
||||
|
||||
_contentManager.Flush();
|
||||
Assert.That(_commentService.GetComments().Count(), Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -3,6 +3,6 @@ Author: Bertrand Le Roy
|
||||
Description:
|
||||
This plug-in replaces
|
||||
'the' with 'le'
|
||||
Version: 1.4.0
|
||||
Version: 1.4.1
|
||||
Tags: plug-in, français, the, le
|
||||
homepage: http://weblogs.asp.net/bleroy
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Orchard.Tests.Data {
|
||||
ProviderUtilities.RunWithSqlCe(recordDescriptors,
|
||||
sessionFactory => {
|
||||
var session = sessionFactory.OpenSession();
|
||||
var foo = new BigRecord { Body = new String('x', 10000) };
|
||||
var foo = new BigRecord { Body = new String('x', 10000), Banner = new byte[10000]};
|
||||
session.Save(foo);
|
||||
session.Flush();
|
||||
session.Close();
|
||||
@@ -28,6 +28,7 @@ namespace Orchard.Tests.Data {
|
||||
|
||||
Assert.That(foo, Is.Not.Null);
|
||||
Assert.That(foo.Body, Is.EqualTo(new String('x', 10000)));
|
||||
Assert.That(foo.Banner.Length, Is.EqualTo(10000));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +43,7 @@ namespace Orchard.Tests.Data {
|
||||
ProviderUtilities.RunWithSqlServer(recordDescriptors,
|
||||
sessionFactory => {
|
||||
var session = sessionFactory.OpenSession();
|
||||
var foo = new BigRecord { Body = new String('x', 10000) };
|
||||
var foo = new BigRecord { Body = new String('x', 10000), Banner = new byte[10000] };
|
||||
session.Save(foo);
|
||||
session.Flush();
|
||||
session.Close();
|
||||
@@ -53,6 +54,7 @@ namespace Orchard.Tests.Data {
|
||||
|
||||
Assert.That(foo, Is.Not.Null);
|
||||
Assert.That(foo.Body, Is.EqualTo(new String('x', 10000)));
|
||||
Assert.That(foo.Banner.Length, Is.EqualTo(10000));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ Author: Bertrand Le Roy
|
||||
Description:
|
||||
This plug-in replaces
|
||||
'the' with 'le'
|
||||
Version: 1.4.0
|
||||
Version: 1.4.1
|
||||
Tags: plug-in, français, the, le
|
||||
homepage: http://weblogs.asp.net/bleroy
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
<Compile Include="UI\Navigation\MenuItemComparerTests.cs" />
|
||||
<Compile Include="UI\Navigation\NavigationManagerTests.cs" />
|
||||
<Compile Include="UI\Navigation\PositionComparerTests.cs" />
|
||||
<Compile Include="Utility\Extensions\RouteValueDictionaryExtensionsTests.cs" />
|
||||
<Compile Include="Utility\Extensions\StringExtensionsTests.cs" />
|
||||
<Compile Include="Utility\ReflectOnTests.cs" />
|
||||
<Compile Include="Utility\ReflectTests.cs" />
|
||||
|
||||
@@ -34,5 +34,5 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -5,5 +5,8 @@ namespace Orchard.Tests.Records {
|
||||
public virtual int Id { get; set; }
|
||||
[StringLengthMax]
|
||||
public virtual string Body { get; set; }
|
||||
|
||||
[StringLengthMax]
|
||||
public virtual byte[] Banner { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Web.Routing;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Tests.Utility.Extensions {
|
||||
[TestFixture]
|
||||
class RouteValueDictionaryExtensionsTests {
|
||||
[Test]
|
||||
public void IdenticalRouteValueDictionariesShouldMatch() {
|
||||
Assert.IsTrue(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" } }
|
||||
.Match(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" } }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CasedRouteValueDictionariesShouldMatch() {
|
||||
Assert.IsTrue(new RouteValueDictionary { { "controller", "foo" }, { "action", "BAR" } }
|
||||
.Match(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" } }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RouteValueDictionariesWithDifferentNumbersOfValuesShouldNotMatch() {
|
||||
Assert.IsFalse(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" } }
|
||||
.Match(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" }, { "area", "baz" } }));
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RouteValueDictionariesWithDifferentValuesShouldMatch() {
|
||||
Assert.IsFalse(new RouteValueDictionary { { "controller", "foo" }, { "action", "bar" } }
|
||||
.Match(new RouteValueDictionary { { "controller", "foo" }, { "action", "baz" } }));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,8 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
// Enable web application to call this assembly in Full Trust
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
|
||||
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
@@ -7,13 +7,15 @@ using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Common.DateEditor {
|
||||
public class DateEditorDriver : ContentPartDriver<CommonPart> {
|
||||
private const string DatePattern = "M/d/yyyy";
|
||||
private const string TimePattern = "h:mm:ss tt";
|
||||
private readonly Lazy<CultureInfo> _cultureInfo;
|
||||
|
||||
public DateEditorDriver(
|
||||
IOrchardServices services) {
|
||||
T = NullLocalizer.Instance;
|
||||
Services = services;
|
||||
|
||||
// initializing the culture info lazy initializer
|
||||
_cultureInfo = new Lazy<CultureInfo>(() => CultureInfo.GetCultureInfo(Services.WorkContext.CurrentCulture));
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
@@ -52,8 +54,11 @@ namespace Orchard.Core.Common.DateEditor {
|
||||
theDatesHaveNotBeenModified;
|
||||
|
||||
if (theEditorShouldBeBlank == false) {
|
||||
model.CreatedDate = part.CreatedUtc.Value.ToLocalTime().ToString(DatePattern, CultureInfo.InvariantCulture);
|
||||
model.CreatedTime = part.CreatedUtc.Value.ToLocalTime().ToString(TimePattern, CultureInfo.InvariantCulture);
|
||||
// date and time are formatted using the same patterns as DateTimePicker is, preventing other cultures issues
|
||||
var createdLocal = TimeZoneInfo.ConvertTimeFromUtc(part.CreatedUtc.Value, Services.WorkContext.CurrentTimeZone);
|
||||
|
||||
model.CreatedDate = createdLocal.ToString("d", _cultureInfo.Value);
|
||||
model.CreatedTime = createdLocal.ToString("t", _cultureInfo.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,11 +67,14 @@ namespace Orchard.Core.Common.DateEditor {
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.CreatedDate) && !string.IsNullOrWhiteSpace(model.CreatedTime)) {
|
||||
DateTime createdUtc;
|
||||
|
||||
string parseDateTime = String.Concat(model.CreatedDate, " ", model.CreatedTime);
|
||||
|
||||
// use an english culture as it is the one used by jQuery.datepicker by default
|
||||
if (DateTime.TryParse(parseDateTime, CultureInfo.GetCultureInfo("en-US"), DateTimeStyles.AssumeLocal, out createdUtc)) {
|
||||
part.CreatedUtc = createdUtc.ToUniversalTime();
|
||||
// use current culture
|
||||
if (DateTime.TryParse(parseDateTime, _cultureInfo.Value, DateTimeStyles.None, out createdUtc)) {
|
||||
|
||||
// the date time is entered locally for the configured timezone
|
||||
part.CreatedUtc = TimeZoneInfo.ConvertTimeToUtc(createdUtc, Services.WorkContext.CurrentTimeZone);
|
||||
}
|
||||
else {
|
||||
updater.AddModelError(Prefix, T("{0} is an invalid date and time", parseDateTime));
|
||||
|
||||
@@ -120,10 +120,16 @@ namespace Orchard.Core.Common.Drivers {
|
||||
private void Add(string segment) {
|
||||
if (string.IsNullOrEmpty(segment))
|
||||
return;
|
||||
if (string.IsNullOrEmpty(_path))
|
||||
|
||||
if (string.IsNullOrEmpty(_path)) {
|
||||
_path = segment;
|
||||
else
|
||||
}
|
||||
else if (segment.StartsWith("/")) {
|
||||
_path = _path + segment;
|
||||
}
|
||||
else {
|
||||
_path = _path + "/" + segment;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
|
||||
FeatureDescription: Core content parts.
|
||||
Dependencies: Settings
|
||||
|
||||
@@ -11,4 +11,10 @@ fieldset.createdutc-datetime input {
|
||||
padding:1px;
|
||||
text-align:center;
|
||||
color:#666;
|
||||
}
|
||||
input#DateEditor_CreatedDate {
|
||||
width:10em;
|
||||
}
|
||||
input#DateEditor_CreatedTime {
|
||||
width:7em;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@Html.TextBox("Text", (string)Model.Text, new { @class = "text large" })
|
||||
@@ -0,0 +1 @@
|
||||
@Html.TextBox("Text", (string)Model.Text, new { @class = "text text-small" })
|
||||
@@ -0,0 +1 @@
|
||||
@Html.TextBox("Text", (string)Model.Text, new { @class = "text textMedium" })
|
||||
@@ -1,11 +1,7 @@
|
||||
@model Orchard.Core.Common.DateEditor.DateEditorViewModel
|
||||
@{
|
||||
var DateEditor = Model;
|
||||
Script.Require("jQueryUtils_TimePicker");
|
||||
Script.Require("jQueryUI_DatePicker");
|
||||
Style.Require("Common_DatePicker");
|
||||
Style.Require("jQueryUtils_TimePicker");
|
||||
Style.Require("jQueryUI_DatePicker");
|
||||
}
|
||||
<fieldset class="createdutc-datetime">
|
||||
@Html.LabelFor(m => DateEditor.CreatedDate, T("Created On"))
|
||||
@@ -15,6 +11,11 @@
|
||||
@Html.EditorFor(m => DateEditor.CreatedTime)
|
||||
</fieldset>
|
||||
@using(Script.Foot()) {
|
||||
|
||||
@* generates the localization script *@
|
||||
@Display(New.DatePickerLocalization())
|
||||
@Display(New.TimePickerLocalization())
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function () {
|
||||
@@ -34,7 +35,7 @@
|
||||
}
|
||||
});
|
||||
$('#@Html.FieldIdFor(m => DateEditor.CreatedDate)').datepicker({ showAnim: "" });
|
||||
$('#@Html.FieldIdFor(m => DateEditor.CreatedTime)').timepickr({ showAnim: "" });
|
||||
$('#@Html.FieldIdFor(m => DateEditor.CreatedTime)').timepicker({ stepMinute: 5});
|
||||
})
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
|
||||
return shapeHelper.Parts_Container_Contained(
|
||||
List: listShape,
|
||||
Pager: pagerShape
|
||||
Pager: part.Paginated ? pagerShape : null
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The containers module introduces container and containable behaviors for content items.
|
||||
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.
|
||||
Dependencies: Contents
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The contents module enables the creation of custom content types.
|
||||
Features:
|
||||
Contents
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
|
||||
FeatureDescription: Standard admin dashboard.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The Feeds module is providing RSS feeds to content items.
|
||||
FeatureDescription: RSS feeds for content items.
|
||||
Category: Syndication
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
|
||||
FeatureDescription: Menu management.
|
||||
Category: Core
|
||||
|
||||
@@ -227,6 +227,7 @@
|
||||
<Compile Include="Settings\Models\SiteSettingsPart.cs" />
|
||||
<Compile Include="Settings\Services\SiteService.cs" />
|
||||
<Compile Include="Settings\ViewModels\SiteSettingsPartViewModel.cs" />
|
||||
<Compile Include="Shapes\Localization\DateTimeLocalization.cs" />
|
||||
<Compile Include="Shapes\ResourceManifest.cs" />
|
||||
<Compile Include="Shapes\CoreShapes.cs" />
|
||||
<Compile Include="Shapes\DateTimeShapes.cs" />
|
||||
@@ -473,6 +474,15 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Shapes\Views\ShapeResult\DisplayPartial.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Body-Wide.Editor.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Body-Large.Editor.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Body-Small.Editor.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.2")]
|
||||
[assembly: AssemblyFileVersion("1.4.2")]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The scheduling module enables background task scheduling.
|
||||
FeatureDescription: Scheduled background tasks.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The settings module creates site settings that other modules can contribute to.
|
||||
FeatureDescription: Site settings.
|
||||
Category: Core
|
||||
|
||||
@@ -408,9 +408,6 @@ namespace Orchard.Core.Shapes {
|
||||
var lastText = LastText ?? T(">>");
|
||||
var gapText = GapText ?? T("...");
|
||||
|
||||
// workaround: get it from the shape instead of parameter
|
||||
var RouteValues = (object)Shape.RouteValues;
|
||||
|
||||
var routeData = new RouteValueDictionary(Html.ViewContext.RouteData.Values);
|
||||
var queryString = _workContext.Value.HttpContext.Request.QueryString;
|
||||
if (queryString != null) {
|
||||
@@ -418,17 +415,26 @@ namespace Orchard.Core.Shapes {
|
||||
routeData[key] = queryString[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (Shape.RouteData != null) {
|
||||
var shapeRouteData = Shape.RouteData is RouteValueDictionary ? (RouteValueDictionary) RouteValues : new RouteValueDictionary(RouteValues);
|
||||
foreach (var rd in shapeRouteData) {
|
||||
shapeRouteData[rd.Key] = rd.Value;
|
||||
|
||||
// specific cross-requests route data can be passed to the shape directly (e.g., Orchard.Users)
|
||||
var shapeRoute = (object)Shape.RouteData;
|
||||
|
||||
if (shapeRoute != null) {
|
||||
var shapeRouteData = shapeRoute as RouteValueDictionary;
|
||||
if (shapeRouteData == null) {
|
||||
var route = shapeRoute as RouteData;
|
||||
if (route != null) {
|
||||
shapeRouteData = (route).Values;
|
||||
}
|
||||
}
|
||||
|
||||
if (shapeRouteData != null) {
|
||||
foreach (var rd in shapeRouteData) {
|
||||
routeData[rd.Key] = rd.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (routeData.ContainsKey("id"))
|
||||
// routeData.Remove("id");
|
||||
|
||||
// HACK: MVC 3 is adding a specific value in System.Web.Mvc.Html.ChildActionExtensions.ActionHelper
|
||||
// when a content item is set as home page, it is rendered by using Html.RenderAction, and the routeData is altered
|
||||
// This code removes this extra route value
|
||||
|
||||
@@ -1,23 +1,31 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Shapes.Localization;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Services;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Orchard.Core.Shapes {
|
||||
public class DateTimeShapes : IDependency {
|
||||
private readonly IClock _clock;
|
||||
private readonly IDateTimeLocalization _dateTimeLocalization;
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
private readonly Lazy<CultureInfo> _cultureInfo;
|
||||
|
||||
public DateTimeShapes(
|
||||
IClock clock,
|
||||
IDateTimeLocalization dateTimeLocalization,
|
||||
IWorkContextAccessor workContextAccessor
|
||||
) {
|
||||
_clock = clock;
|
||||
_dateTimeLocalization = dateTimeLocalization;
|
||||
_workContextAccessor = workContextAccessor;
|
||||
T = NullLocalizer.Instance;
|
||||
|
||||
_cultureInfo = new Lazy<CultureInfo>(() => CultureInfo.GetCultureInfo(_workContextAccessor.GetContext().CurrentCulture));
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
@@ -45,10 +53,10 @@ namespace Orchard.Core.Shapes {
|
||||
//using a LocalizedString forces the caller to use a localizable format
|
||||
|
||||
if (CustomFormat == null || String.IsNullOrWhiteSpace(CustomFormat.Text)) {
|
||||
return DateTime(DateTimeUtc, T("MMM d yyyy h:mm tt"));
|
||||
return DateTime(DateTimeUtc, _dateTimeLocalization.LongDateTimeFormat);
|
||||
}
|
||||
|
||||
return new MvcHtmlString(ConvertToDisplayTime(DateTimeUtc).ToString(CustomFormat.Text));
|
||||
return new MvcHtmlString(ConvertToDisplayTime(DateTimeUtc).ToString(CustomFormat.Text, _cultureInfo.Value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
112
src/Orchard.Web/Core/Shapes/Localization/DateTimeLocalization.cs
Normal file
112
src/Orchard.Web/Core/Shapes/Localization/DateTimeLocalization.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Shapes.Localization {
|
||||
|
||||
public interface IDateTimeLocalization : IDependency {
|
||||
LocalizedString MonthNames { get; }
|
||||
LocalizedString MonthNamesShort { get; }
|
||||
LocalizedString DayNames { get; }
|
||||
LocalizedString DayNamesShort { get; }
|
||||
LocalizedString DayNamesMin { get; }
|
||||
|
||||
LocalizedString ShortDateFormat { get; }
|
||||
LocalizedString ShortTimeFormat { get; }
|
||||
LocalizedString LongDateTimeFormat { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The first day of the week, Sun = 0, Mon = 1, ...
|
||||
/// </summary>
|
||||
int FirstDay { get; }
|
||||
|
||||
/// <summary>
|
||||
/// True if the year select precedes month, false for month then year
|
||||
/// </summary>
|
||||
bool ShowMonthAfterYear { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional text to append to the year in the month headers
|
||||
/// </summary>
|
||||
string YearSuffix { get; }
|
||||
}
|
||||
|
||||
public class DateTimeLocalization : IDateTimeLocalization {
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public DateTimeLocalization() {
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public LocalizedString MonthNames {
|
||||
get { return T("January, February, March, April, May, June, July, August, September, October, November, December"); }
|
||||
}
|
||||
|
||||
public LocalizedString MonthNamesShort {
|
||||
get { return T("Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec"); }
|
||||
}
|
||||
|
||||
public LocalizedString DayNames {
|
||||
get { return T("Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"); }
|
||||
}
|
||||
|
||||
public LocalizedString DayNamesShort {
|
||||
get { return T("Sun, Mon, Tue, Wed, Thu, Fri, Sat"); }
|
||||
}
|
||||
|
||||
public LocalizedString DayNamesMin {
|
||||
get { return T("Su, Mo, Tu, We, Th, Fr, Sa"); }
|
||||
}
|
||||
|
||||
public LocalizedString ShortDateFormat {
|
||||
get { return T("M/d/yyyy"); }
|
||||
}
|
||||
|
||||
public LocalizedString ShortTimeFormat {
|
||||
get { return T("h:mm tt"); }
|
||||
}
|
||||
|
||||
public LocalizedString LongDateTimeFormat {
|
||||
get { return T("MMM d yyyy h:mm tt"); }
|
||||
}
|
||||
|
||||
public int FirstDay {
|
||||
get {
|
||||
var firstDay = 1;
|
||||
var t = T("firstDay: 1").Text;
|
||||
var parts = t.Split(':');
|
||||
if(parts.Length == 2) {
|
||||
Int32.TryParse(parts[1], out firstDay);
|
||||
}
|
||||
|
||||
return firstDay;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowMonthAfterYear {
|
||||
get {
|
||||
var showMonthAfterYear = false;
|
||||
var t = T("showMonthAfterYear: false").Text;
|
||||
var parts = t.Split(':');
|
||||
if (parts.Length == 2) {
|
||||
Boolean.TryParse(parts[1], out showMonthAfterYear);
|
||||
}
|
||||
|
||||
return showMonthAfterYear;
|
||||
}
|
||||
}
|
||||
|
||||
public string YearSuffix {
|
||||
get {
|
||||
var yearSuffix = String.Empty;
|
||||
var t = T("yearSuffix: ").Text;
|
||||
var parts = t.Split(':');
|
||||
if (parts.Length == 2) {
|
||||
return parts[1].Trim();
|
||||
}
|
||||
|
||||
return yearSuffix;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The shapes module contains core shape templates and display hooks.
|
||||
FeatureDescription: Core shape templates and display hooks.
|
||||
Category: Core
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
@@ -7,6 +8,15 @@ namespace Orchard.Core.Title.Handlers {
|
||||
|
||||
public TitlePartHandler(IRepository<TitlePartRecord> repository) {
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
OnIndexing<TitlePart>((context, part) => context.DocumentIndex.Add("title", part.Title).RemoveTags().Analyze());
|
||||
}
|
||||
|
||||
protected override void GetItemMetadata(GetContentItemMetadataContext context) {
|
||||
var part = context.ContentItem.As<TitlePart>();
|
||||
|
||||
if (part != null) {
|
||||
context.Metadata.DisplayText = part.Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The title module enables content items to have titles.
|
||||
FeatureDescription: Title content part.
|
||||
Category: Core
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.Title, T("Title"))
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "large text" })
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "large text", autofocus = "autofocus" })
|
||||
<span class="hint">@T("You must provide a unique title for this content item")</span>
|
||||
</fieldset>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
|
||||
FeatureDescription: XML-RPC opt-in implementation.
|
||||
Category: Content Publishing
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.1
|
||||
OrchardVersion: 1.4.1
|
||||
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
|
||||
FeatureDescription: Lucene indexing services.
|
||||
Category: Search
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.1
|
||||
OrchardVersion: 1.4.1
|
||||
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
|
||||
FeatureDescription: Markdown editor.
|
||||
Category: Input Editor
|
||||
|
||||
@@ -27,6 +27,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Markdown {
|
||||
manifest.DefineScript("Markdown_Converter").SetUrl("Markdown.Converter.js");
|
||||
manifest.DefineScript("Markdown_Sanitizer").SetUrl("Markdown.Sanitizer.js").SetDependencies("Markdown_Converter");
|
||||
manifest.DefineScript("Markdown_Editor").SetUrl("Markdown.Editor.js").SetDependencies("Markdown_Sanitizer");
|
||||
manifest.DefineScript("Resizer").SetUrl("jquery.textarearesizer.min.js");
|
||||
manifest.DefineScript("Resizer").SetUrl("jquery.textarearesizer.min.js").SetDependencies("jQuery");
|
||||
|
||||
manifest.DefineScript("OrchardMarkdown").SetUrl("orchard-markdown.js").SetDependencies("Resizer", "Markdown_Editor");
|
||||
manifest.DefineStyle("OrchardMarkdown").SetUrl("admin-markdown.css");
|
||||
|
||||
@@ -1,43 +1,53 @@
|
||||
(function () {
|
||||
var marker = '<!-- markdown -->';
|
||||
var converter = Markdown.getSanitizingConverter();
|
||||
var editor = new Markdown.Editor(converter, "", {
|
||||
handler: function () { window.open("http://daringfireball.net/projects/markdown/syntax"); }
|
||||
});
|
||||
|
||||
editor.hooks.set("insertImageDialog", function (callback) {
|
||||
// see if there's an image selected that they intend on editing
|
||||
var wmd = $('#wmd-input');
|
||||
var editors = $('.wmd-input');
|
||||
|
||||
var editImage, content = wmd.selection ? wmd.selection.createRange().text : null;
|
||||
if (content) {
|
||||
// replace <img> with <editimg>, so we can easily use jquery to get the 'src' without it
|
||||
// being resolved by the browser (e.g. prevent '/foo.png' becoming 'http://localhost:12345/orchardlocal/foo.png').
|
||||
content = content.replace(/\<IMG/gi, "<editimg");
|
||||
var firstImg = $(content).filter("editimg");
|
||||
if (firstImg.length) {
|
||||
editImage = {
|
||||
src: firstImg.attr("src"),
|
||||
"class": firstImg.attr("class"),
|
||||
style: firstImg.css("cssText"),
|
||||
alt: firstImg.attr("alt"),
|
||||
width: firstImg.attr("width"),
|
||||
height: firstImg.attr("height"),
|
||||
align: firstImg.attr("align")
|
||||
};
|
||||
}
|
||||
}
|
||||
wmd.trigger("orchard-admin-pickimage-open", {
|
||||
img: editImage,
|
||||
uploadMediaPath: wmd.data("mediapicker-uploadpath"),
|
||||
callback: function (data) {
|
||||
callback(data.img.src);
|
||||
}
|
||||
editors.each(function () {
|
||||
|
||||
var idPostfix = $(this).attr('id').substr('wmd-input'.length);
|
||||
|
||||
var editor = new Markdown.Editor(converter, idPostfix, {
|
||||
handler: function () { window.open("http://daringfireball.net/projects/markdown/syntax"); }
|
||||
});
|
||||
return true;
|
||||
|
||||
editor.hooks.set("insertImageDialog", function (callback) {
|
||||
// see if there's an image selected that they intend on editing
|
||||
var wmd = $('#wmd-input' + idPostfix);
|
||||
|
||||
var editImage, content = wmd.selection ? wmd.selection.createRange().text : null;
|
||||
if (content) {
|
||||
// replace <img> with <editimg>, so we can easily use jquery to get the 'src' without it
|
||||
// being resolved by the browser (e.g. prevent '/foo.png' becoming 'http://localhost:12345/orchardlocal/foo.png').
|
||||
content = content.replace(/\<IMG/gi, "<editimg");
|
||||
var firstImg = $(content).filter("editimg");
|
||||
if (firstImg.length) {
|
||||
editImage = {
|
||||
src: firstImg.attr("src"),
|
||||
"class": firstImg.attr("class"),
|
||||
style: firstImg.css("cssText"),
|
||||
alt: firstImg.attr("alt"),
|
||||
width: firstImg.attr("width"),
|
||||
height: firstImg.attr("height"),
|
||||
align: firstImg.attr("align")
|
||||
};
|
||||
}
|
||||
}
|
||||
wmd.trigger("orchard-admin-pickimage-open", {
|
||||
img: editImage,
|
||||
uploadMediaPath: wmd.data("mediapicker-uploadpath"),
|
||||
callback: function (data) {
|
||||
callback(data.img.src);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
editor.run();
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
$('.grippie').TextAreaResizer();
|
||||
})();
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
@{
|
||||
Script.Require("OrchardMarkdown");
|
||||
Style.Require("OrchardMarkdown");
|
||||
string idPostfix = @Html.FieldIdFor(m => m);
|
||||
}
|
||||
<fieldset>
|
||||
<div id="wmd-button-bar" class="wmd-button-bar"></div>
|
||||
<div id="wmd-button-bar-@idPostfix" class="wmd-button-bar"></div>
|
||||
|
||||
@Html.TextArea("Text", (string)Model.Text, 25, 80,
|
||||
new Dictionary<string,object> {
|
||||
{"id", "wmd-input"},
|
||||
new Dictionary<string, object> {
|
||||
{"id", "wmd-input" + "-" + idPostfix},
|
||||
{"class", "wmd-input grippie"},
|
||||
{"data-mediapicker-uploadpath", Model.AddMediaPath},
|
||||
{"data-mediapicker-title", T("Insert/Update Media")}
|
||||
@@ -16,5 +17,5 @@
|
||||
|
||||
<fieldset>
|
||||
<label>@T("Preview")</label>
|
||||
<div id="wmd-preview" class="wmd-panel wmd-preview"></div>
|
||||
<div id="wmd-preview-@idPostfix" class="wmd-panel wmd-preview"></div>
|
||||
</fieldset>
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace Orchard.ArchiveLater.Drivers {
|
||||
public class ArchiveLaterPartDriver : ContentPartDriver<ArchiveLaterPart> {
|
||||
private const string TemplateName = "Parts/ArchiveLater";
|
||||
private readonly IArchiveLaterService _archiveLaterService;
|
||||
private const string DatePattern = "M/d/yyyy";
|
||||
private const string TimePattern = "h:mm tt";
|
||||
private readonly Lazy<CultureInfo> _cultureInfo;
|
||||
|
||||
public ArchiveLaterPartDriver(
|
||||
IOrchardServices services,
|
||||
@@ -22,6 +21,10 @@ namespace Orchard.ArchiveLater.Drivers {
|
||||
_archiveLaterService = archiveLaterService;
|
||||
T = NullLocalizer.Instance;
|
||||
Services = services;
|
||||
|
||||
// initializing the culture info lazy initializer
|
||||
_cultureInfo = new Lazy<CultureInfo>(() => CultureInfo.GetCultureInfo(Services.WorkContext.CurrentCulture));
|
||||
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
@@ -39,11 +42,14 @@ namespace Orchard.ArchiveLater.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ArchiveLaterPart part, dynamic shapeHelper) {
|
||||
var model = new ArchiveLaterViewModel(part) {ScheduledArchiveUtc = part.ScheduledArchiveUtc.Value};
|
||||
var localDate = new Lazy<DateTime>(() => TimeZoneInfo.ConvertTimeFromUtc(part.ScheduledArchiveUtc.Value.Value, Services.WorkContext.CurrentTimeZone));
|
||||
|
||||
model.ArchiveLater = model.ScheduledArchiveUtc.HasValue;
|
||||
model.ScheduledArchiveDate = model.ScheduledArchiveUtc.HasValue ? model.ScheduledArchiveUtc.Value.ToLocalTime().ToString(DatePattern, CultureInfo.InvariantCulture) : String.Empty;
|
||||
model.ScheduledArchiveTime = model.ScheduledArchiveUtc.HasValue ? model.ScheduledArchiveUtc.Value.ToLocalTime().ToString(TimePattern, CultureInfo.InvariantCulture) : String.Empty;
|
||||
var model = new ArchiveLaterViewModel(part) {
|
||||
ScheduledArchiveUtc = part.ScheduledArchiveUtc.Value,
|
||||
ArchiveLater = part.ScheduledArchiveUtc.Value.HasValue,
|
||||
ScheduledArchiveDate = part.ScheduledArchiveUtc.Value.HasValue ? localDate.Value.ToString("d", _cultureInfo.Value) : String.Empty,
|
||||
ScheduledArchiveTime = part.ScheduledArchiveUtc.Value.HasValue ? localDate.Value.ToString("t", _cultureInfo.Value) : String.Empty
|
||||
};
|
||||
|
||||
return ContentShape("Parts_ArchiveLater_Edit",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
|
||||
@@ -58,8 +64,11 @@ namespace Orchard.ArchiveLater.Drivers {
|
||||
var parseDateTime = String.Concat(model.ScheduledArchiveDate, " ", model.ScheduledArchiveTime);
|
||||
|
||||
// use an english culture as it is the one used by jQuery.datepicker by default
|
||||
if (DateTime.TryParse(parseDateTime, CultureInfo.GetCultureInfo("en-US"), DateTimeStyles.AssumeLocal, out scheduled)) {
|
||||
model.ScheduledArchiveUtc = scheduled.ToUniversalTime();
|
||||
if (DateTime.TryParse(parseDateTime, _cultureInfo.Value, DateTimeStyles.None, out scheduled)) {
|
||||
// the date time is entered locally for the configured timezone
|
||||
var timeZone = Services.WorkContext.CurrentTimeZone;
|
||||
|
||||
model.ScheduledArchiveUtc = TimeZoneInfo.ConvertTimeToUtc(scheduled, timeZone);
|
||||
_archiveLaterService.ArchiveLater(model.ContentItem, model.ScheduledArchiveUtc.HasValue ? model.ScheduledArchiveUtc.Value : DateTime.MaxValue);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -3,8 +3,8 @@ Path: ArchiveLater
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The ArchiveLater module introduces scheduled archiving functionality.
|
||||
FeatureDescription: Scheduled archiving.
|
||||
Category: Content
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.2")]
|
||||
[assembly: AssemblyFileVersion("1.4.2")]
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ html.dyn input.hinted {
|
||||
font-style:italic;
|
||||
}
|
||||
input#ArchiveLater_ScheduledArchiveDate {
|
||||
width:49%;
|
||||
width:10em;
|
||||
}
|
||||
input#ArchiveLater_ScheduledArchiveTime {
|
||||
width:43%;
|
||||
width:7em;
|
||||
}
|
||||
|
||||
.edit-item-sidebar fieldset.archive-later-datetime {
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
@model Orchard.ArchiveLater.ViewModels.ArchiveLaterViewModel
|
||||
@using System.Web.Mvc.Html;
|
||||
@{
|
||||
Style.Require("jQueryUtils_TimePicker");
|
||||
Style.Require("jQueryUI_DatePicker");
|
||||
Style.Require("ArchiveLater_DatePicker");
|
||||
Script.Require("jQueryUI_DatePicker");
|
||||
Script.Require("jQueryUtils_TimePicker");
|
||||
}
|
||||
|
||||
<fieldset class="archive-later-datetime">
|
||||
@@ -22,6 +18,11 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
@using(Script.Foot()) {
|
||||
|
||||
@* generates the localization script *@
|
||||
@Display(New.DatePickerLocalization())
|
||||
@Display(New.TimePickerLocalization())
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function () {
|
||||
@@ -38,7 +39,7 @@
|
||||
}
|
||||
});
|
||||
$('#@ViewData.TemplateInfo.GetFullHtmlFieldId("ScheduledArchiveDate")').datepicker({ showAnim: "" }).focus(function () { $('#@ViewData.TemplateInfo.GetFullHtmlFieldId("Command_ArchiveLater")').attr("checked", "checked") });
|
||||
$('#@ViewData.TemplateInfo.GetFullHtmlFieldId("ScheduledArchiveTime")').timepickr().focus(function () { $('#@ViewData.TemplateInfo.GetFullHtmlFieldId("Command_ArchiveLater")').attr("checked", "checked") });
|
||||
$('#@ViewData.TemplateInfo.GetFullHtmlFieldId("ScheduledArchiveTime")').timepicker({ stepMinute: 5 }).focus(function () { $('#@ViewData.TemplateInfo.GetFullHtmlFieldId("Command_ArchiveLater")').attr("checked", "checked") });
|
||||
})
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class="pageStatus">
|
||||
<li>
|
||||
<img class="icon" src="@Href("~/Modules/Orchard.ArchiveLater/Content/Admin/images/scheduled.gif")" alt="@T("Scheduled")" title="@T("The page is scheduled for archiving")" />@T("Unpublish on")
|
||||
@Display.DateTime(DateTimeUtc: (DateTime)Model.ScheduledArchiveUtc.ToLocalTime(), CustomFormat: T("M/d/yyyy h:mm tt"))
|
||||
@Display.DateTime(DateTimeUtc: (DateTime)Model.ScheduledArchiveUtc, CustomFormat: T("M/d/yyyy h:mm tt"))
|
||||
|
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.Commands;
|
||||
@@ -39,11 +38,14 @@ namespace Orchard.Blogs.Commands {
|
||||
public string FeedUrl { get; set; }
|
||||
|
||||
[OrchardSwitch]
|
||||
public int Id { get; set; }
|
||||
public int BlogId { get; set; }
|
||||
|
||||
[OrchardSwitch]
|
||||
public string Owner { get; set; }
|
||||
|
||||
[OrchardSwitch]
|
||||
public string Slug { get; set; }
|
||||
|
||||
[OrchardSwitch]
|
||||
public string Title { get; set; }
|
||||
|
||||
@@ -57,7 +59,7 @@ namespace Orchard.Blogs.Commands {
|
||||
public bool Homepage { get; set; }
|
||||
|
||||
[CommandName("blog create")]
|
||||
[CommandHelp("blog create /Title:<title> [/Owner:<username>] [/Description:<description>] [/MenuText:<menu text>] [/Homepage:true|false]\r\n\t" + "Creates a new Blog")]
|
||||
[CommandHelp("blog create [/Slug:<slug>] /Title:<title> [/Owner:<username>] [/Description:<description>] [/MenuText:<menu text>] [/Homepage:true|false]\r\n\t" + "Creates a new Blog")]
|
||||
[OrchardSwitches("Title,Owner,Description,MenuText,Homepage")]
|
||||
public void Create() {
|
||||
if (String.IsNullOrEmpty(Owner)) {
|
||||
@@ -82,15 +84,14 @@ namespace Orchard.Blogs.Commands {
|
||||
blog.As<MenuPart>().MenuText = MenuText;
|
||||
}
|
||||
|
||||
if (Homepage) {
|
||||
if (Homepage || !String.IsNullOrWhiteSpace(Slug)) {
|
||||
dynamic dblog = blog;
|
||||
if (dblog.AutoroutePart != null) {
|
||||
dblog.AutoroutePart.UseCustomPattern = true;
|
||||
dblog.AutoroutePart.CustomPattern = "";
|
||||
dblog.AutoroutePart.CustomPattern = Homepage ? "/" : Slug;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
_contentManager.Create(blog);
|
||||
|
||||
Context.Output.WriteLine(T("Blog created successfully"));
|
||||
@@ -98,7 +99,7 @@ namespace Orchard.Blogs.Commands {
|
||||
|
||||
[CommandName("blog import")]
|
||||
[CommandHelp("blog import /BlogId:<id> /FeedUrl:<feed url> /Owner:<username>\r\n\t" + "Import all items from <feed url> into the blog specified by <id>")]
|
||||
[OrchardSwitches("FeedUrl,Id,Owner")]
|
||||
[OrchardSwitches("FeedUrl,BlogId,Owner")]
|
||||
public void Import() {
|
||||
var owner = _membershipService.GetUser(Owner);
|
||||
|
||||
@@ -118,10 +119,10 @@ namespace Orchard.Blogs.Commands {
|
||||
throw new OrchardException(T("An error occured while loading the feed at {0}.", FeedUrl), ex);
|
||||
}
|
||||
|
||||
var blog = _blogService.Get(Id,VersionOptions.Latest);
|
||||
var blog = _blogService.Get(BlogId, VersionOptions.Latest);
|
||||
|
||||
if ( blog == null ) {
|
||||
Context.Output.WriteLine(T("Blog not found with specified Id: {0}", Id));
|
||||
Context.Output.WriteLine(T("Blog not found with specified Id: {0}", BlogId));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The Orchard Blogs module is implementing basic blogging features.
|
||||
FeatureDescription: A simple web log.
|
||||
Dependencies: Shapes, Common, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.2")]
|
||||
[assembly: AssemblyFileVersion("1.4.2")]
|
||||
|
||||
|
||||
@@ -33,4 +33,4 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{$$ModuleProjectGuid$$}</ProjectGuid>
|
||||
<ProjectTypeGuids>{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>$$ModuleName$$</RootNamespace>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.1
|
||||
OrchardVersion: 1.4.1
|
||||
Description: Tools to create Orchard components.
|
||||
FeatureDescription: Tools to create Orchard components.
|
||||
Category: Developer
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
|
||||
@@ -17,13 +17,14 @@ namespace Orchard.Comments.Drivers {
|
||||
|
||||
var commentsForCommentedContent = _commentService.GetCommentsForCommentedContent(part.ContentItem.Id);
|
||||
Func<int> pendingCount = () => commentsForCommentedContent.Where(x => x.Status == CommentStatus.Pending).Count();
|
||||
Func<int> approvedCount = () => commentsForCommentedContent.Where(x => x.Status == CommentStatus.Approved).Count();
|
||||
|
||||
return Combined(
|
||||
|
||||
ContentShape("Parts_Comments_Count",
|
||||
() => shapeHelper.Parts_Comments_Count(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
|
||||
() => shapeHelper.Parts_Comments_Count(CommentCount: approvedCount(), PendingCount: pendingCount())),
|
||||
ContentShape("Parts_Comments_Count_SummaryAdmin",
|
||||
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
|
||||
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: approvedCount(), PendingCount: pendingCount()))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,15 @@ namespace Orchard.Comments.Drivers {
|
||||
|
||||
var commentsForCommentedContent = _commentService.GetCommentsForCommentedContent(part.ContentItem.Id);
|
||||
Func<int> pendingCount = () => commentsForCommentedContent.Where(x => x.Status == CommentStatus.Pending).Count();
|
||||
Func<int> approvedCount = () => commentsForCommentedContent.Where(x => x.Status == CommentStatus.Approved).Count();
|
||||
|
||||
return Combined(
|
||||
ContentShape("Parts_Comments",
|
||||
() => shapeHelper.Parts_Comments()),
|
||||
ContentShape("Parts_Comments_Count",
|
||||
() => shapeHelper.Parts_Comments_Count(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
|
||||
() => shapeHelper.Parts_Comments_Count(CommentCount: approvedCount(), PendingCount: pendingCount())),
|
||||
ContentShape("Parts_Comments_Count_SummaryAdmin",
|
||||
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
|
||||
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: approvedCount(), PendingCount: pendingCount()))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: The comments system implemented by this module can be applied to arbitrary Orchard content types, such as blogs and pages. It includes comment validation and spam protection through the Akismet service.
|
||||
Features:
|
||||
Orchard.Comments:
|
||||
|
||||
@@ -30,6 +30,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly:SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.2")]
|
||||
[assembly: AssemblyFileVersion("1.4.2")]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ul class="pageStatus">
|
||||
<li>
|
||||
@Display.CommentSummaryLinks(item: Model.ContentPart.ContentItem, count: Model.CommentCount, pendingCount: ((Func<int>)Model.PendingCount)())
|
||||
@Display.CommentSummaryLinks(item: Model.ContentPart.ContentItem, count: Model.CommentCount, pendingCount: Model.PendingCount)
|
||||
@T(" | ")
|
||||
</li>
|
||||
</ul>
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.1
|
||||
OrchardVersion: 1.4.1
|
||||
Description: ContentTypes modules enables the creation and alteration of content types not based on code.
|
||||
Dependencies: Contents
|
||||
Category: Content
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.2
|
||||
OrchardVersion: 1.4.2
|
||||
Description: Contains designer tools to ease the Themes development process
|
||||
FeatureName: Shape Tracing
|
||||
Category: Designer
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -31,6 +31,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.2")]
|
||||
[assembly: AssemblyFileVersion("1.4.2")]
|
||||
|
||||
@@ -114,8 +114,10 @@ namespace Orchard.DesignerTools.Services {
|
||||
}
|
||||
|
||||
foreach (var member in members) {
|
||||
if (o is ContentItem && member.Name == "ContentManager"
|
||||
|| o is Delegate) {
|
||||
if (o is ContentItem && member.Name == "ContentManager"
|
||||
|| o is Delegate
|
||||
|| o is Type
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
SafeCall(() => DumpMember(o, member));
|
||||
|
||||
@@ -22,7 +22,11 @@ namespace Orchard.DesignerTools.Services {
|
||||
return null;
|
||||
}
|
||||
|
||||
var request = _httpContextAccessor.Current().Request;
|
||||
var request = httpContext.Request;
|
||||
|
||||
if (request == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// extract each segment of the url
|
||||
var urlSegments = VirtualPathUtility.ToAppRelative(request.Path.ToLower())
|
||||
|
||||
@@ -6,6 +6,7 @@ using Orchard.Email.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Email.Handlers {
|
||||
@@ -15,6 +16,8 @@ namespace Orchard.Email.Handlers {
|
||||
|
||||
public SmtpSettingsPartHandler(IRepository<SmtpSettingsPartRecord> repository, IEncryptionService encryptionService) {
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
|
||||
_encryptionService = encryptionService;
|
||||
Filters.Add(new ActivatingFilter<SmtpSettingsPart>("Site"));
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
@@ -22,8 +25,19 @@ namespace Orchard.Email.Handlers {
|
||||
OnLoaded<SmtpSettingsPart>(LazyLoadHandlers);
|
||||
}
|
||||
|
||||
public new ILogger Logger { get; set; }
|
||||
|
||||
void LazyLoadHandlers(LoadContentContext context, SmtpSettingsPart part) {
|
||||
part.PasswordField.Getter(() => String.IsNullOrWhiteSpace(part.Record.Password) ? String.Empty : Encoding.UTF8.GetString(_encryptionService.Decode(Convert.FromBase64String(part.Record.Password))));
|
||||
part.PasswordField.Getter(() => {
|
||||
try {
|
||||
return String.IsNullOrWhiteSpace(part.Record.Password) ? String.Empty : Encoding.UTF8.GetString(_encryptionService.Decode(Convert.FromBase64String(part.Record.Password)));
|
||||
}
|
||||
catch {
|
||||
Logger.Error("The email password could not be decrypted. It might be corrupted, try to reset it.");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
part.PasswordField.Setter(value => part.Record.Password = String.IsNullOrWhiteSpace(value) ? String.Empty : Convert.ToBase64String(_encryptionService.Encode(Encoding.UTF8.GetBytes(value))));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.4.0
|
||||
OrchardVersion: 1.4.0
|
||||
Version: 1.4.1
|
||||
OrchardVersion: 1.4.1
|
||||
Description: The Email Messaging module adds Email sending functionalities.
|
||||
Features:
|
||||
Orchard.Email:
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: SecurityTransparent]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace Orchard.Email.Rules {
|
||||
if (recipient == "owner") {
|
||||
var content = context.Tokens["Content"] as IContent;
|
||||
if (content.Has<CommonPart>()) {
|
||||
var owner = content.As<CommonPart>().Owner.ContentItem;
|
||||
if (owner != null && owner.Record != null) {
|
||||
_messageManager.Send(owner.Record, MessageType, "email", properties);
|
||||
var owner = content.As<CommonPart>().Owner;
|
||||
if (owner != null && owner.ContentItem != null && owner.ContentItem.Record != null) {
|
||||
_messageManager.Send(owner.ContentItem.Record, MessageType, "email", properties);
|
||||
}
|
||||
_messageManager.Send(
|
||||
SplitEmail(owner.As<IUser>().Email), MessageType, "email", properties);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user