mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
242 Commits
tests/nuni
...
feature/ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74baa39fac | ||
|
|
1166163623 | ||
|
|
8ff3ec0ee2 | ||
|
|
e01e1ada2d | ||
|
|
74011e659b | ||
|
|
7aa6371ec1 | ||
|
|
c004545eeb | ||
|
|
31f07a44e4 | ||
|
|
13f3473868 | ||
|
|
48eeafe5ca | ||
|
|
83f02b26b6 | ||
|
|
0a06a788b2 | ||
|
|
a5ac956b6a | ||
|
|
3e2b5d5b82 | ||
|
|
a8d4440c2e | ||
|
|
af35f1387c | ||
|
|
161a2e3204 | ||
|
|
ed290180e9 | ||
|
|
50c8a2631d | ||
|
|
6a8a763f0d | ||
|
|
fbe5945ea6 | ||
|
|
03bac9222b | ||
|
|
87a394854d | ||
|
|
897687e4b3 | ||
|
|
147b4fd05b | ||
|
|
a90bdde699 | ||
|
|
6198a9d4fb | ||
|
|
b7414e6f42 | ||
|
|
0f155827fd | ||
|
|
bcd66f39d1 | ||
|
|
7eaaf0d83f | ||
|
|
86b4ff4e65 | ||
|
|
3cb63d80af | ||
|
|
82a827cd51 | ||
|
|
e90f114a8b | ||
|
|
85f0794cf8 | ||
|
|
86ee6332ae | ||
|
|
4bd5e60ca9 | ||
|
|
8fadee4a49 | ||
|
|
14e7bb69ec | ||
|
|
9e57d016df | ||
|
|
e477328c39 | ||
|
|
ac039a1dcd | ||
|
|
eb71d1ced7 | ||
|
|
5ef753ef2d | ||
|
|
a629ce0f4b | ||
|
|
c8a4def111 | ||
|
|
280de4e6fc | ||
|
|
c251665dfe | ||
|
|
d21538eb54 | ||
|
|
ed13ac2802 | ||
|
|
0ed5198cb3 | ||
|
|
018a3faa2e | ||
|
|
91488f31da | ||
|
|
dfa22687b5 | ||
|
|
06778eb584 | ||
|
|
951962f6d9 | ||
|
|
34bd78a487 | ||
|
|
9a8574efa3 | ||
|
|
00fffe03d6 | ||
|
|
fe513532a5 | ||
|
|
b292269f2b | ||
|
|
dcca575fc3 | ||
|
|
b0393a0780 | ||
|
|
6ec23919aa | ||
|
|
77f3a031c5 | ||
|
|
2b3451cd13 | ||
|
|
e962410a72 | ||
|
|
8c97c89414 | ||
|
|
b740bae395 | ||
|
|
ebd731e70a | ||
|
|
c0d207f228 | ||
|
|
43e1040661 | ||
|
|
b8e138b2d5 | ||
|
|
bf2e9970c1 | ||
|
|
37436d86ed | ||
|
|
9591fdfd1f | ||
|
|
8ebf58d27d | ||
|
|
ac3a0387fa | ||
|
|
7d603684f0 | ||
|
|
4f401ca641 | ||
|
|
ef6c7b4d3f | ||
|
|
be323ab608 | ||
|
|
61164da947 | ||
|
|
900bf8813f | ||
|
|
3e2583d91e | ||
|
|
a4d476e58f | ||
|
|
d441d836e8 | ||
|
|
4b43b881f7 | ||
|
|
2440e68c3f | ||
|
|
e4ae744e0c | ||
|
|
4e5f6af28d | ||
|
|
06422f9e63 | ||
|
|
c05b2546f1 | ||
|
|
f7425f871d | ||
|
|
fef3fbfbe7 | ||
|
|
4a9c4c5019 | ||
|
|
010b1884bd | ||
|
|
fe316f480c | ||
|
|
6442380bf0 | ||
|
|
660f41c582 | ||
|
|
a4f2e040b2 | ||
|
|
a5605b7fbd | ||
|
|
38bf36075a | ||
|
|
652981b835 | ||
|
|
3a84a0b79c | ||
|
|
0e188054c9 | ||
|
|
ef31bee59a | ||
|
|
fbd9e873c5 | ||
|
|
81a767bd26 | ||
|
|
b1f8bea54d | ||
|
|
b9c610b770 | ||
|
|
d7719c4bcf | ||
|
|
f634f9351f | ||
|
|
2871bf2626 | ||
|
|
54c8c8417e | ||
|
|
c24ca00de9 | ||
|
|
9fbe1138d5 | ||
|
|
a9fef84f87 | ||
|
|
e888b07924 | ||
|
|
4d7fd2f5ba | ||
|
|
fbb3047195 | ||
|
|
19b8a853ff | ||
|
|
dfd045005b | ||
|
|
11454fade9 | ||
|
|
a198decc70 | ||
|
|
a59c1a07c9 | ||
|
|
0728793e0e | ||
|
|
a624080fb2 | ||
|
|
b36c34bbf4 | ||
|
|
8f2e9caa8f | ||
|
|
2bfd3448a2 | ||
|
|
01500bc7a5 | ||
|
|
d7682123a7 | ||
|
|
dad2714852 | ||
|
|
3568db209c | ||
|
|
2ee299eb6c | ||
|
|
5af991e516 | ||
|
|
564327ed58 | ||
|
|
7e45c5a339 | ||
|
|
db780bb2ba | ||
|
|
9d8272fdd5 | ||
|
|
bbca767be2 | ||
|
|
1c0b73949e | ||
|
|
2c5ed16cd6 | ||
|
|
3694444ff3 | ||
|
|
07b6a44426 | ||
|
|
ac418cf28c | ||
|
|
bdde332b49 | ||
|
|
960d486b3c | ||
|
|
bfcc304a26 | ||
|
|
5100009ff2 | ||
|
|
2a545d992a | ||
|
|
ba134bb868 | ||
|
|
80f7661e43 | ||
|
|
c2ba016abe | ||
|
|
19954f1b4b | ||
|
|
69b312362c | ||
|
|
464bdb07f6 | ||
|
|
dd59417c4a | ||
|
|
847364bbd2 | ||
|
|
7e11509182 | ||
|
|
783d569434 | ||
|
|
ede741b9df | ||
|
|
9f4b842df2 | ||
|
|
de8c084c53 | ||
|
|
2d294fe421 | ||
|
|
f2ec191259 | ||
|
|
c1107b37bd | ||
|
|
b9aaa90ec8 | ||
|
|
ee223f3641 | ||
|
|
5ecfcd861a | ||
|
|
dc192bf9cb | ||
|
|
336cda8c34 | ||
|
|
f660c101cc | ||
|
|
1f768c8768 | ||
|
|
9736f12bcc | ||
|
|
d9e59eada6 | ||
|
|
8f3eadb2ae | ||
|
|
724afd53e0 | ||
|
|
9a1d047154 | ||
|
|
74a5672f90 | ||
|
|
8b66c9530f | ||
|
|
d556f701b8 | ||
|
|
9fa1e13457 | ||
|
|
ded813225a | ||
|
|
b8924808ea | ||
|
|
7bf836aeb7 | ||
|
|
3dc6e6523f | ||
|
|
c85709ffef | ||
|
|
de9e91e5d6 | ||
|
|
0df2f3ab57 | ||
|
|
740039d6ef | ||
|
|
e30c86d0a5 | ||
|
|
559985b29c | ||
|
|
d39485abf2 | ||
|
|
c4dd5a9e18 | ||
|
|
9a2c08d31e | ||
|
|
dd326127ce | ||
|
|
82c9baad18 | ||
|
|
2273d38a7f | ||
|
|
181db18355 | ||
|
|
32bf5ed6c8 | ||
|
|
af7da7963e | ||
|
|
3b7a54f10d | ||
|
|
5e6a1549ad | ||
|
|
447728df03 | ||
|
|
30f163bd39 | ||
|
|
78bab529d2 | ||
|
|
31ed21b061 | ||
|
|
712ff2f487 | ||
|
|
aae9f6270e | ||
|
|
26e2fe9977 | ||
|
|
b1c606becc | ||
|
|
8b8cf0b7e6 | ||
|
|
7effab96a0 | ||
|
|
1b8bcb8a4e | ||
|
|
026acc4aa9 | ||
|
|
775ff6c55e | ||
|
|
1553c443a4 | ||
|
|
3a58dc8085 | ||
|
|
ad6a2b96e5 | ||
|
|
72c9f0063b | ||
|
|
a8d4b18f72 | ||
|
|
1907e57902 | ||
|
|
a806ac7487 | ||
|
|
47072f91ae | ||
|
|
bbe4110053 | ||
|
|
5dfda7c0a8 | ||
|
|
89a5953ea3 | ||
|
|
c61666bfdc | ||
|
|
2749f2fa21 | ||
|
|
fe5c8ba233 | ||
|
|
290f8e4594 | ||
|
|
5811598dff | ||
|
|
2a01771a37 | ||
|
|
a1531da11b | ||
|
|
ad59c46aad | ||
|
|
49022cd1b5 | ||
|
|
a886d8e26f | ||
|
|
4cc48a380d | ||
|
|
f3971484b8 |
@@ -23,13 +23,14 @@ echo "Unable to detect suitable environment. Build may not succeed."
|
||||
|
||||
SET target=%1
|
||||
SET project=%2
|
||||
SET solution=%3
|
||||
|
||||
IF "%target%" == "" SET target=Build
|
||||
IF "%project%" =="" SET project=Orchard.proj
|
||||
IF "%project%" == "" SET project=Orchard.proj
|
||||
IF "%solution%" == "" SET solution=src\Orchard.sln
|
||||
|
||||
lib\nuget\nuget.exe restore .\src\Orchard.sln
|
||||
lib\nuget\nuget.exe restore %solution%
|
||||
|
||||
msbuild /t:%target% %project%
|
||||
|
||||
pause
|
||||
msbuild /t:%target% %project% /p:Solution=%solution% /m
|
||||
|
||||
pause
|
||||
53
Orchard.proj
53
Orchard.proj
@@ -28,11 +28,14 @@
|
||||
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
|
||||
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
|
||||
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
|
||||
|
||||
<OrchardSolution>$(SrcFolder)\Orchard.sln</OrchardSolution>
|
||||
<Solution Condition="$(Solution) == ''">$(OrchardSolution)</Solution>
|
||||
|
||||
<!-- TeamCity build number -->
|
||||
<Version>$(BUILD_NUMBER)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<!-- Finding the restored NuGet package of NUnit (version number doesn't matter)
|
||||
to be able to reference the test runner executable (http://stackoverflow.com/a/25617556). -->
|
||||
<ItemGroup>
|
||||
@@ -45,11 +48,11 @@
|
||||
|
||||
<!-- Coordinating Targets -->
|
||||
|
||||
<Target Name ="Build">
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="Clean"/>
|
||||
<CallTarget Targets="Compile"/>
|
||||
<CallTarget Targets="Test"/>
|
||||
<CallTarget Targets="Package"/>
|
||||
<CallTarget Targets="Package"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="FastBuild">
|
||||
@@ -103,7 +106,7 @@
|
||||
<!-- Building -->
|
||||
|
||||
<Target Name="Clean">
|
||||
<MSBuild Projects="$(SrcFolder)\Orchard.sln" Targets="Clean" />
|
||||
<MSBuild Projects="$(Solution)" Targets="Clean" />
|
||||
<RemoveDir Directories="$(BuildFolder)" ContinueOnError="true"/>
|
||||
<RemoveDir Directories="$(ArtifactsFolder)" />
|
||||
</Target>
|
||||
@@ -111,16 +114,16 @@
|
||||
<Target Name="Compile">
|
||||
<!-- Compile to "OutputFolder" -->
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
|
||||
<!-- Compile to "regular" output folder for devs using VS locally -->
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"/>
|
||||
</Target>
|
||||
|
||||
<Target Name ="CompileMsBuildTasks">
|
||||
<Target Name="CompileMsBuildTasks">
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
|
||||
Targets="Build"
|
||||
@@ -129,27 +132,25 @@
|
||||
|
||||
<!-- Testing -->
|
||||
|
||||
<Target Name ="Test">
|
||||
<!-- TeamCity support -->
|
||||
<ItemGroup>
|
||||
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitPackageToolsFolder)\addins" />
|
||||
|
||||
<Target Name="Test">
|
||||
<!-- Run unit test assemblies -->
|
||||
<CreateItem Include="$(CompileFolder)\*.Tests.*dll">
|
||||
<CreateItem Include="$(CompileFolder)\*.Tests.*dll" Exclude="$(CompileFolder)\Orchard.Azure.Tests.dll">
|
||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||
</CreateItem>
|
||||
|
||||
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="@(NUnitPackageToolsFolder)" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
|
||||
</Target>
|
||||
|
||||
<Target Name ="Spec" DependsOnTargets="Package-Stage">
|
||||
<!-- TeamCity support -->
|
||||
<ItemGroup>
|
||||
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitPackageToolsFolder)\addins" />
|
||||
<Target Name="TestAzure">
|
||||
<!-- Run unit test assemblies -->
|
||||
<CreateItem Include="$(CompileFolder)\Orchard.Azure.Tests.dll">
|
||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||
</CreateItem>
|
||||
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="@(NUnitPackageToolsFolder)" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Spec" DependsOnTargets="Package-Stage">
|
||||
|
||||
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
|
||||
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
|
||||
@@ -281,7 +282,6 @@
|
||||
<!-- Packaging (MsDeploy) -->
|
||||
<Target Name="Package-MsDeploy">
|
||||
<ItemGroup>
|
||||
<!--<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.xml" />-->
|
||||
|
||||
<MsDeploy-Exclude-Modules Include="
|
||||
$(StageFolder)\**\Modules\Orchard.CustomForms\**;
|
||||
@@ -292,7 +292,7 @@
|
||||
$(StageFolder)\**\Modules\Orchard.TaskLease\**;
|
||||
" />
|
||||
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.dll.config;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Parameters Include="$(LibFolder)\msdeploy\*.xml;$(LibFolder)\msdeploy\*.sql"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -331,11 +331,12 @@
|
||||
$(MSBuildProjectDirectory)\**\*.user;
|
||||
$(MSBuildProjectDirectory)\**\*.patch;
|
||||
$(MSBuildProjectDirectory)\**\*.hgignore;
|
||||
$(MSBuildProjectDirectory)\**\*.hg*\**\*;" />
|
||||
$(MSBuildProjectDirectory)\**\*.hg*\**\*;
|
||||
$(LibFolder)\nunit\addins\**\*;" />
|
||||
|
||||
<Zip-Stage Include="$(StageFolder)\**\*" />
|
||||
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude="$(MSBuildProjectDirectory)\**\bin\**\*.pdb;" />
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude=""/>
|
||||
|
||||
<Zip-Source Include="
|
||||
$(MSBuildProjectDirectory)\lib\**\*;
|
||||
|
||||
15
README.md
15
README.md
@@ -6,7 +6,7 @@ Orchard is a free, open source, community-focused Content Management System buil
|
||||
|
||||
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
|
||||
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS.1.0.4)
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
|
||||
|
||||
## About The Orchard Project
|
||||
|
||||
@@ -22,8 +22,13 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
||||
|
||||
## Project Status
|
||||
|
||||
Orchard is currently in version 1.9.2. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.9.2 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
|
||||
Orchard is currently in version **[1.10.1](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.1)** and **[1.9.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.9.3)**:
|
||||
|
||||
- *1.10.1* is the latest minor version that contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*). **If you're new to Orchard, you should use this version.**
|
||||
- *1.9.3* contains further bugfixes in addition to *1.9.2* and these versions are based on the feature set of Orchard *1.9*.
|
||||
|
||||
We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and it's easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard) as well. We encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](http://docs.orchardproject.net/Documentation/feature-roadmap)
|
||||
@@ -45,10 +50,10 @@ There are many ways you can [contribute to Orchard](http://orchardproject.net/co
|
||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
||||
* [Participate in forum discussions](http://orchard.codeplex.com/discussions)
|
||||
* [Submit a pull request](http://docs.orchardproject.net/Documentation/Contributing-patches)
|
||||
* [Translate Orchard](http://orchardproject.net/localize)
|
||||
* [Translate Orchard](http://orchardproject.net/localization)
|
||||
* [Contribute modules and themes to our gallery](http://gallery.orchardproject.net/)
|
||||
* [Send us feedback](mailto:ofeedbk@microsoft.com)
|
||||
|
||||
## The Future Of Orchard CMS: Orchard 2
|
||||
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET vNext](http://www.asp.net/vnext). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET Core](http://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
|
||||
|
||||
@@ -68,13 +68,11 @@ IF NOT DEFINED MSBUILD_PATH (
|
||||
echo Handling .NET Web Application deployment.
|
||||
|
||||
:: 1. Restore NuGet packages
|
||||
IF /I "" NEQ "" (
|
||||
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
)
|
||||
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
:: 2. Build to the temporary path
|
||||
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m
|
||||
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m /m
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
:: 3. KuduSync
|
||||
|
||||
@@ -10,6 +10,7 @@ var fs = require("fs"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
sass = require("gulp-sass"),
|
||||
cssnano = require("gulp-cssnano"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
@@ -131,12 +132,16 @@ function createAssetGroupTask(assetGroup, doRebuild) {
|
||||
function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".less" && ext !== ".css")
|
||||
if (ext !== ".less" && ext !== ".scss" && ext !== ".css")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
var containsLessOrScss = assetGroup.inputPaths.some(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
return ext === ".less" || ext === ".scss";
|
||||
});
|
||||
// Source maps are useless if neither concatenating nor transforming.
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !assetGroup.inputPaths.some(function (inputPath) { return path.extname(inputPath).toLowerCase() === ".less"; }))
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !containsLessOrScss)
|
||||
generateSourceMaps = false;
|
||||
var minifiedStream = gulp.src(assetGroup.inputPaths) // Minified output, source mapping completely disabled.
|
||||
.pipe(gulpif(!doRebuild,
|
||||
@@ -148,6 +153,9 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", sass({
|
||||
precision: 10
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(cssnano({
|
||||
autoprefixer: { browsers: ["last 2 versions"] },
|
||||
@@ -173,6 +181,9 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", sass({
|
||||
precision: 10
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(header(
|
||||
"/*\n" +
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Orchard.Azure.Tests.FileSystems.Media {
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void GetFileShouldOnlyAcceptRelativePath() {
|
||||
_azureBlobStorageProvider.CreateFile("foo.txt");
|
||||
_azureBlobStorageProvider.GetFile("/foot.txt");
|
||||
_azureBlobStorageProvider.GetFile("/foo.txt");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -291,7 +291,7 @@ namespace Orchard.Azure.Tests.FileSystems.Media {
|
||||
[Test]
|
||||
public void GetStoragePathShouldReturnNullIfPathIsNotLocal()
|
||||
{
|
||||
var storagePath = _azureBlobStorageProvider.GetStoragePath("foo");
|
||||
var storagePath = _azureBlobStorageProvider.GetStoragePath("http://orchardproject.net/foo");
|
||||
|
||||
Assert.IsNull(storagePath);
|
||||
}
|
||||
|
||||
@@ -91,6 +91,14 @@
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.mocks, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.mocks.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="pnunit.framework, Version=1.0.4109.34242, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.2.5.10.11092\lib\pnunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net452" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net452" />
|
||||
<package id="System.Spatial" version="5.6.4" targetFramework="net452" />
|
||||
<package id="WindowsAzure.Storage" version="5.0.2" targetFramework="net452" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -61,8 +61,8 @@
|
||||
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Orchard.Specs.Bindings {
|
||||
webApp.GivenIHaveACleanSiteWith(
|
||||
virtualDirectory,
|
||||
TableData(
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.CustomForms, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.Media, Orchard.MediaLibrary, Orchard.MediaPicker, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Rules, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.TaskLease, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.MediaLibrary, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Scenario: Creating and using Boolean fields
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Check if the event is active"
|
||||
|
||||
# The default value should be selected
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
@@ -65,14 +65,8 @@ Scenario: Creating and using Boolean fields
|
||||
# The value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.NotSetLabel | May be |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.SelectionMode | Radiobutton |
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
|
||||
34
src/Orchard.Specs/Boolean.feature.cs
generated
34
src/Orchard.Specs/Boolean.feature.cs
generated
@@ -195,40 +195,22 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"false"});
|
||||
#line 67
|
||||
testRunner.And("I fill in", ((string)(null)), table6, "And ");
|
||||
#line 70
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 71
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table7.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.NotSetLabel",
|
||||
"May be"});
|
||||
#line 70
|
||||
testRunner.And("I fill in", ((string)(null)), table7, "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.SelectionMode",
|
||||
"Radiobutton"});
|
||||
#line 73
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 76
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 77
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Event.Active.Value",
|
||||
""});
|
||||
#line 78
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 81
|
||||
#line 72
|
||||
testRunner.And("I fill in", ((string)(null)), table7, "And ");
|
||||
#line 75
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 82
|
||||
#line 76
|
||||
testRunner.Then("I should see \"The field Active is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -89,9 +89,9 @@ Scenario: Creating and using Date fields
|
||||
# Required & Date and Time
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
@@ -139,6 +139,23 @@ Scenario: Creating and using Date fields
|
||||
When I hit "Save"
|
||||
Then I should see "Date of the event is required."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Date | 01/31/2016 |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Time | 10:00 AM |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
When I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
When I go to "Admin/Contents/List"
|
||||
Then I should see "Date of the event"
|
||||
And I should see "1/31/2016 10:00"
|
||||
|
||||
Scenario: Creating and using date time fields in another culture
|
||||
|
||||
# Creating an Event content type
|
||||
@@ -190,4 +207,4 @@ Scenario: Creating and using date time fields in another culture
|
||||
| Event.EventDate.Editor.Time | 18:00 |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
Then I should see "Your Event has been created."
|
||||
169
src/Orchard.Specs/DateTime.feature.cs
generated
169
src/Orchard.Specs/DateTime.feature.cs
generated
@@ -350,6 +350,41 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 140
|
||||
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 143
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Date",
|
||||
"01/31/2016"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Time",
|
||||
"10:00 AM"});
|
||||
#line 144
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 149
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 150
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 151
|
||||
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 152
|
||||
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 153
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 154
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 155
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 156
|
||||
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 157
|
||||
testRunner.And("I should see \"1/31/2016 10:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
@@ -359,101 +394,83 @@ this.ScenarioSetup(scenarioInfo);
|
||||
public virtual void CreatingAndUsingDateTimeFieldsInAnotherCulture()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using date time fields in another culture", ((string[])(null)));
|
||||
#line 142
|
||||
#line 159
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 145
|
||||
#line 162
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 146
|
||||
#line 163
|
||||
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 147
|
||||
#line 164
|
||||
testRunner.And("I have the file \"Content\\orchard.core.po\" in \"Core\\App_Data\\Localization\\fr-FR\\or" +
|
||||
"chard.core.po\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 148
|
||||
#line 165
|
||||
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 149
|
||||
#line 166
|
||||
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 150
|
||||
#line 167
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
table15.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 151
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 155
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 156
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 157
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 160
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 161
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table16.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Date of the event"});
|
||||
"Event"});
|
||||
table16.AddRow(new string[] {
|
||||
"Name",
|
||||
"EventDate"});
|
||||
table16.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"DateTimeField"});
|
||||
#line 162
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 167
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
"Event"});
|
||||
#line 168
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 169
|
||||
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 172
|
||||
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 173
|
||||
testRunner.And("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 174
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 177
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 178
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
"DisplayName",
|
||||
"Date of the event"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
#line 174
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 178
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
"Name",
|
||||
"EventDate"});
|
||||
table17.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"DateTimeField"});
|
||||
#line 179
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 184
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 185
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 186
|
||||
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 189
|
||||
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 190
|
||||
testRunner.And("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table18.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"01/31/2012"});
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table18.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"12:00 AM"});
|
||||
#line 180
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
#line 191
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 184
|
||||
#line 195
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 185
|
||||
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 186
|
||||
#line 196
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
@@ -461,17 +478,35 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"31/01/2012"});
|
||||
"01/31/2012"});
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"18:00"});
|
||||
#line 187
|
||||
"12:00 AM"});
|
||||
#line 197
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 191
|
||||
#line 201
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 192
|
||||
#line 202
|
||||
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 203
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"31/01/2012"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"18:00"});
|
||||
#line 204
|
||||
testRunner.And("I fill in", ((string)(null)), table20, "And ");
|
||||
#line 208
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 209
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 193
|
||||
#line 210
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -107,3 +107,34 @@ Scenario: Creating and using Enumeration fields
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I hit "Save"
|
||||
Then I should see "The field Location is mandatory."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Options | Seattle |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Dropdown |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | Seattle |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "selected=\"selected">Seattle"
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | true |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Listbox |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | false |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Listbox |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
|
||||
63
src/Orchard.Specs/Enumeration.feature.cs
generated
63
src/Orchard.Specs/Enumeration.feature.cs
generated
@@ -273,6 +273,69 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 109
|
||||
testRunner.Then("I should see \"The field Location is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 112
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Options",
|
||||
"Seattle"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Dropdown"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"Seattle"});
|
||||
#line 113
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 118
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 119
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 120
|
||||
testRunner.Then("I should see \"selected=\\\"selected\">Seattle\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 123
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
#line 124
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 128
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 129
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 130
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 133
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"false"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
#line 134
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 138
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 140
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace Orchard.Specs.Hosting {
|
||||
}
|
||||
public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase) {
|
||||
var config = (MsSqlCeConfiguration)base.GetPersistenceConfigurer(createDatabase);
|
||||
config.ShowSql();
|
||||
// Uncomment to display SQL while running tests
|
||||
// config.ShowSql();
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,3 +128,30 @@ Scenario: Creating and using Input fields
|
||||
When I go to "Admin/Contents/List"
|
||||
Then I should see "Contact:"
|
||||
And I should see "contact@orchardproject.net"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact@orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"contact@orchardproject.net\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
51
src/Orchard.Specs/Input.feature.cs
generated
51
src/Orchard.Specs/Input.feature.cs
generated
@@ -297,6 +297,57 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.Then("I should see \"Contact:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 130
|
||||
testRunner.And("I should see \"contact@orchardproject.net\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 133
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
"contact@orchardproject.net"});
|
||||
#line 134
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 137
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 138
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
testRunner.Then("I should see \"value=\\\"contact@orchardproject.net\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 142
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
#line 143
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 146
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 147
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 148
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 151
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"false"});
|
||||
#line 152
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 155
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 156
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 157
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -67,4 +67,31 @@ Scenario: Creating and using Link fields
|
||||
| name | value |
|
||||
| Event.SiteUrl.Value | |
|
||||
And I hit "Save"
|
||||
Then I should see "Url is required for Site Url."
|
||||
Then I should see "Url is required for Site Url."
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | http://www.orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"http://www.orchardproject.net\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
51
src/Orchard.Specs/Link.feature.cs
generated
51
src/Orchard.Specs/Link.feature.cs
generated
@@ -204,6 +204,57 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 70
|
||||
testRunner.Then("I should see \"Url is required for Site Url.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 73
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
"http://www.orchardproject.net"});
|
||||
#line 74
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 77
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 78
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 79
|
||||
testRunner.Then("I should see \"value=\\\"http://www.orchardproject.net\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 82
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"true"});
|
||||
#line 83
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 86
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 87
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 88
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 91
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"false"});
|
||||
#line 92
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 95
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 96
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 97
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ Scenario: A new tenant is created
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Name | Scott |
|
||||
| RequestUrlPrefix | scott |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "<h3>Scott\s*</h3>"
|
||||
@@ -37,6 +38,7 @@ Scenario: A new tenant is created with uninitialized state
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Name | Scott |
|
||||
| RequestUrlPrefix | scott |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "<li class="tenant Uninitialized">"
|
||||
@@ -199,4 +201,4 @@ Scenario: Listing tenants from command line
|
||||
And I have tenant "Alpha" on "example.org" as "New-site-name"
|
||||
When I execute >tenant list
|
||||
Then I should see "Name: Alpha"
|
||||
And I should see "Request URL host: example.org"
|
||||
And I should see "Request URL host: example.org"
|
||||
|
||||
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
@@ -129,6 +129,9 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table1.AddRow(new string[] {
|
||||
"Name",
|
||||
"Scott"});
|
||||
table1.AddRow(new string[] {
|
||||
"RequestUrlPrefix",
|
||||
"scott"});
|
||||
#line 25
|
||||
testRunner.And("I fill in", ((string)(null)), table1, "And ");
|
||||
#line 28
|
||||
@@ -163,6 +166,9 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table2.AddRow(new string[] {
|
||||
"Name",
|
||||
"Scott"});
|
||||
table2.AddRow(new string[] {
|
||||
"RequestUrlPrefix",
|
||||
"scott"});
|
||||
#line 37
|
||||
testRunner.And("I fill in", ((string)(null)), table2, "And ");
|
||||
#line 40
|
||||
|
||||
@@ -96,4 +96,39 @@ Scenario: Creating and using numeric fields
|
||||
| Fields[0].NumericFieldSettings.Maximum | b |
|
||||
And I hit "Save"
|
||||
Then I should see "The value 'a' is not valid for Minimum."
|
||||
And I should see "The value 'b' is not valid for Maximum."
|
||||
And I should see "The value 'b' is not valid for Maximum."
|
||||
|
||||
# The value should be validated
|
||||
When I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | a |
|
||||
And I hit "Save"
|
||||
Then I should see "Guests is an invalid number"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 1234 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"1234\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
66
src/Orchard.Specs/Numeric.feature.cs
generated
66
src/Orchard.Specs/Numeric.feature.cs
generated
@@ -265,6 +265,72 @@ this.ScenarioSetup(scenarioInfo);
|
||||
testRunner.Then("I should see \"The value 'a' is not valid for Minimum.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 99
|
||||
testRunner.And("I should see \"The value 'b' is not valid for Maximum.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 102
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Event.Guests.Value",
|
||||
"a"});
|
||||
#line 103
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 106
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 107
|
||||
testRunner.Then("I should see \"Guests is an invalid number\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 110
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"1234"});
|
||||
#line 111
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 114
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 115
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 116
|
||||
testRunner.Then("I should see \"value=\\\"1234\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 119
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"true"});
|
||||
#line 120
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 123
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 124
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 125
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 128
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
#line 129
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 132
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 133
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 134
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
@@ -205,6 +205,11 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Text.feature.cs">
|
||||
<DependentUpon>Text.feature</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Input.feature.cs">
|
||||
<DependentUpon>Input.feature</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -371,6 +376,10 @@
|
||||
<None Include="Hosting\Orchard.Web\Config\HostComponents.Release.config">
|
||||
<DependentUpon>HostComponents.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Text.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Text.feature.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Input.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Input.feature.cs</LastGenOutput>
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
101
src/Orchard.Specs/Text.feature
Normal file
101
src/Orchard.Specs/Text.feature
Normal file
@@ -0,0 +1,101 @@
|
||||
Feature: Text Field
|
||||
In order to add Text content to my types
|
||||
As an administrator
|
||||
I want to create, edit and publish Text fields
|
||||
|
||||
Scenario: Creating and using Text fields
|
||||
|
||||
# Creating an Event content type
|
||||
Given I have installed Orchard
|
||||
And I have installed "Orchard.Fields"
|
||||
When I go to "Admin/ContentTypes"
|
||||
Then I should see "<a[^>]*>.*?Create new type</a>"
|
||||
When I go to "Admin/ContentTypes/Create"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| DisplayName | Event |
|
||||
| Name | Event |
|
||||
And I hit "Create"
|
||||
And I go to "Admin/ContentTypes/"
|
||||
Then I should see "Event"
|
||||
|
||||
# Adding a Text field
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I follow "Add Field"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| DisplayName | Subject |
|
||||
| Name | Subject |
|
||||
| FieldTypeName | TextField |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "The \"Subject\" field has been added."
|
||||
|
||||
# The display option should be effective
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Flavor | Large |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "class=\"text large\""
|
||||
|
||||
# The value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | |
|
||||
And I hit "Save"
|
||||
Then I should see "The field Subject is mandatory."
|
||||
|
||||
# The hint should be displayed
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Hint | Subject of the event |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Subject of the event"
|
||||
|
||||
# Creating an Event content item
|
||||
When I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Subject"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | Orchard Harvest 2015 |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
And I should see "Orchard Harvest 2015"
|
||||
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | Orchard Harvest 2016 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "value=\"Orchard Harvest 2016\""
|
||||
|
||||
# The required attribute should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | true |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# The required attribute should not be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
268
src/Orchard.Specs/Text.feature.cs
generated
Normal file
268
src/Orchard.Specs/Text.feature.cs
generated
Normal file
@@ -0,0 +1,268 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
#region Designer generated code
|
||||
#pragma warning disable
|
||||
namespace Orchard.Specs
|
||||
{
|
||||
using TechTalk.SpecFlow;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[NUnit.Framework.TestFixtureAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Text Field")]
|
||||
public partial class TextFieldFeature
|
||||
{
|
||||
|
||||
private static TechTalk.SpecFlow.ITestRunner testRunner;
|
||||
|
||||
#line 1 "Text.feature"
|
||||
#line hidden
|
||||
|
||||
[NUnit.Framework.TestFixtureSetUpAttribute()]
|
||||
public virtual void FeatureSetup()
|
||||
{
|
||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Text Field", " In order to add Text content to my types\r\n As an administrator\r\n I want to cr" +
|
||||
"eate, edit and publish Text fields", ProgrammingLanguage.CSharp, ((string[])(null)));
|
||||
testRunner.OnFeatureStart(featureInfo);
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestFixtureTearDownAttribute()]
|
||||
public virtual void FeatureTearDown()
|
||||
{
|
||||
testRunner.OnFeatureEnd();
|
||||
testRunner = null;
|
||||
}
|
||||
|
||||
[NUnit.Framework.SetUpAttribute()]
|
||||
public virtual void TestInitialize()
|
||||
{
|
||||
}
|
||||
|
||||
[NUnit.Framework.TearDownAttribute()]
|
||||
public virtual void ScenarioTearDown()
|
||||
{
|
||||
testRunner.OnScenarioEnd();
|
||||
}
|
||||
|
||||
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
||||
{
|
||||
testRunner.OnScenarioStart(scenarioInfo);
|
||||
}
|
||||
|
||||
public virtual void ScenarioCleanup()
|
||||
{
|
||||
testRunner.CollectScenarioErrors();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Creating and using Text fields")]
|
||||
public virtual void CreatingAndUsingTextFields()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using Text fields", ((string[])(null)));
|
||||
#line 6
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 9
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 10
|
||||
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 11
|
||||
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 12
|
||||
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 13
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table1.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
table1.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 14
|
||||
testRunner.And("I fill in", ((string)(null)), table1, "And ");
|
||||
#line 18
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 19
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 20
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 23
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 24
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table2.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Subject"});
|
||||
table2.AddRow(new string[] {
|
||||
"Name",
|
||||
"Subject"});
|
||||
table2.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"TextField"});
|
||||
#line 25
|
||||
testRunner.And("I fill in", ((string)(null)), table2, "And ");
|
||||
#line 30
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 31
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 32
|
||||
testRunner.Then("I should see \"The \\\"Subject\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 35
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table3.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Flavor",
|
||||
"Large"});
|
||||
#line 36
|
||||
testRunner.And("I fill in", ((string)(null)), table3, "And ");
|
||||
#line 39
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 40
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 41
|
||||
testRunner.Then("I should see \"class=\\\"text large\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 44
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table4.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
#line 45
|
||||
testRunner.And("I fill in", ((string)(null)), table4, "And ");
|
||||
#line 48
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 49
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table5.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
""});
|
||||
#line 50
|
||||
testRunner.And("I fill in", ((string)(null)), table5, "And ");
|
||||
#line 53
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 54
|
||||
testRunner.Then("I should see \"The field Subject is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 57
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table6.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Hint",
|
||||
"Subject of the event"});
|
||||
#line 58
|
||||
testRunner.And("I fill in", ((string)(null)), table6, "And ");
|
||||
#line 61
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 62
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 63
|
||||
testRunner.Then("I should see \"Subject of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 66
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 67
|
||||
testRunner.Then("I should see \"Subject\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table7.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
"Orchard Harvest 2015"});
|
||||
#line 68
|
||||
testRunner.When("I fill in", ((string)(null)), table7, "When ");
|
||||
#line 71
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 72
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 73
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 74
|
||||
testRunner.And("I should see \"Orchard Harvest 2015\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 77
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
"Orchard Harvest 2016"});
|
||||
#line 78
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 81
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 82
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 83
|
||||
testRunner.Then("I should see \"value=\\\"Orchard Harvest 2016\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 86
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
#line 87
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 90
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 91
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 92
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 95
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"false"});
|
||||
#line 96
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 99
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 100
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 101
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endregion
|
||||
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -203,6 +203,8 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
|
||||
public class ProcessingEngineStub : IProcessingEngine {
|
||||
|
||||
public void Initialize() { }
|
||||
|
||||
public string AddTask(ShellSettings shellSettings, ShellDescriptor shellDescriptor, string messageName, Dictionary<string, object> parameters) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="DotNetZip" version="1.9.1.8" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
|
||||
<package id="Lucene.Net" version="3.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace Orchard.Tests {
|
||||
// .Conventions.AddFromAssemblyOf<DataModule>();
|
||||
var persistenceModel = AbstractDataServicesProvider.CreatePersistenceModel(types.Select(t => new RecordBlueprint { TableName = "Test_" + t.Name, Type = t }).ToList());
|
||||
var persistenceConfigurer = new SqlCeDataServicesProvider(fileName).GetPersistenceConfigurer(true/*createDatabase*/);
|
||||
((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
// Uncomment to display SQL while running tests
|
||||
// ((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
|
||||
return Fluently.Configure()
|
||||
.Database(persistenceConfigurer)
|
||||
|
||||
@@ -46,7 +46,8 @@ namespace Orchard.Tests {
|
||||
|
||||
var fileName = "temp.sdf";
|
||||
var persistenceConfigurer = new SqlCeDataServicesProvider(fileName).GetPersistenceConfigurer(true/*createDatabase*/);
|
||||
((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
// Uncomment to display SQL while running tests
|
||||
// ((MsSqlCeConfiguration)persistenceConfigurer).ShowSql();
|
||||
|
||||
var sessionFactory = Fluently.Configure()
|
||||
.Database(persistenceConfigurer)
|
||||
|
||||
@@ -3,6 +3,7 @@ using Autofac;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization.Models;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
namespace Orchard.Tests.Localization {
|
||||
|
||||
@@ -303,10 +304,11 @@ namespace Orchard.Tests.Localization {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description("DST date and time are not properly round-tripped when date is ignored.")]
|
||||
[Description("DST is ignored when date is ignored (non-DST date).")]
|
||||
public void ConvertToLocalizedTimeStringTest03() {
|
||||
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone);
|
||||
var clock = new StubClock(new DateTime(2012, 1, 1, 12, 0, 0, DateTimeKind.Utc));
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
|
||||
var target = container.Resolve<IDateLocalizationServices>();
|
||||
|
||||
var dateString = "3/10/2012";
|
||||
@@ -318,7 +320,27 @@ namespace Orchard.Tests.Localization {
|
||||
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
|
||||
|
||||
Assert.AreEqual(dateString, dateString2);
|
||||
Assert.AreNotEqual(timeString, timeString2);
|
||||
Assert.AreEqual(timeString, timeString2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description("DST is ignored when date is ignored (DST date).")]
|
||||
public void ConvertToLocalizedTimeStringTest04() {
|
||||
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
|
||||
var clock = new StubClock(new DateTime(2012, 10, 3, 12, 0, 0, DateTimeKind.Utc));
|
||||
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
|
||||
var target = container.Resolve<IDateLocalizationServices>();
|
||||
|
||||
var dateString = "3/10/2012";
|
||||
var timeString = "12:00:00 PM";
|
||||
|
||||
var dateTimeUtc = target.ConvertFromLocalizedString(dateString, timeString);
|
||||
|
||||
var dateString2 = target.ConvertToLocalizedDateString(dateTimeUtc);
|
||||
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
|
||||
|
||||
Assert.AreEqual(dateString, dateString2);
|
||||
Assert.AreEqual(timeString, timeString2);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,9 +9,12 @@ using Orchard.Tests.Stubs;
|
||||
namespace Orchard.Tests.Localization {
|
||||
|
||||
internal class TestHelpers {
|
||||
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone) {
|
||||
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone, IClock clock = null) {
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterType<StubClock>().As<IClock>();
|
||||
if (clock != null)
|
||||
builder.RegisterInstance(clock);
|
||||
else
|
||||
builder.RegisterType<StubClock>().As<IClock>();
|
||||
builder.RegisterInstance<WorkContext>(new StubWorkContext(cultureName, calendarName, timeZone));
|
||||
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
|
||||
builder.RegisterType<CultureDateTimeFormatProvider>().As<IDateTimeFormatProvider>();
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
|
||||
@@ -33,5 +33,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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
@@ -4,8 +4,13 @@ using Orchard.Services;
|
||||
|
||||
namespace Orchard.Tests.Stubs {
|
||||
public class StubClock : IClock {
|
||||
public StubClock() {
|
||||
UtcNow = new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc);
|
||||
|
||||
public StubClock()
|
||||
: this(new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc)) {
|
||||
}
|
||||
|
||||
public StubClock(DateTime utcNow) {
|
||||
UtcNow = utcNow;
|
||||
}
|
||||
|
||||
public DateTime UtcNow { get; private set; }
|
||||
@@ -18,7 +23,6 @@ namespace Orchard.Tests.Stubs {
|
||||
return UtcNow.Add(span);
|
||||
}
|
||||
|
||||
|
||||
public IVolatileToken When(TimeSpan duration) {
|
||||
return new Clock.AbsoluteExpirationToken(this, duration);
|
||||
}
|
||||
|
||||
@@ -31,9 +31,13 @@ namespace Orchard.Tests.UI.Resources {
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths) {
|
||||
VerifyPaths(resourceType, defaultSettings, expectedPaths, false);
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths, bool ssl) {
|
||||
defaultSettings = defaultSettings ?? new RequireSettings();
|
||||
var requiredResources = _resourceManager.BuildRequiredResources(resourceType);
|
||||
var renderedResources = string.Join(",", requiredResources.Select(context => context.GetResourceUrl(defaultSettings, _appPath)).ToArray());
|
||||
var renderedResources = string.Join(",", requiredResources.Select(context => context.GetResourceUrl(defaultSettings, _appPath, ssl)).ToArray());
|
||||
Assert.That(renderedResources, Is.EqualTo(expectedPaths));
|
||||
}
|
||||
|
||||
@@ -92,6 +96,33 @@ namespace Orchard.Tests.UI.Resources {
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "http://cdn/script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnSslPathIsUsedInCdnMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.js").SetCdn("https://cdn/script1.min.js");
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "https://cdn/script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalPathIsUsedInCdnModeNotSupportsSsl() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js", false);
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalDebugPathIsUsedInCdnModeNotSupportsSslAndDebug() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js", false);
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true, DebugMode = true }, "script1.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnDebugPathIsUsedInCdnModeAndDebugMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Autofac.Web" version="3.2.0" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net452" />
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Services.ClientAddressAccessor">
|
||||
<Component Type="Orchard.Services.ClientHostAddressAccessor">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
|
||||
<Property Name="EnableClientHostAddressHeader" Value="false"/>
|
||||
@@ -120,5 +120,13 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.DefaultOrchardHost">
|
||||
<Properties>
|
||||
<!-- The number of retries when a tenant can't be loaded -->
|
||||
<Property Name="Retries" Value="1"/>
|
||||
<Property Name="DelayRetries" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
||||
@@ -11,6 +11,7 @@ using Orchard.Core.Common.ViewModels;
|
||||
using Orchard.Services;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
public class BodyPartDriver : ContentPartDriver<BodyPart> {
|
||||
@@ -75,6 +76,10 @@ namespace Orchard.Core.Common.Drivers {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Text", part.Text);
|
||||
}
|
||||
|
||||
protected override void Cloning(BodyPart originalPart, BodyPart clonePart, CloneContentContext context) {
|
||||
clonePart.Text = originalPart.Text;
|
||||
}
|
||||
|
||||
private static BodyEditorViewModel BuildEditorViewModel(BodyPart part,RequestContext requestContext) {
|
||||
return new BodyEditorViewModel {
|
||||
BodyPart = part,
|
||||
|
||||
@@ -123,5 +123,9 @@ namespace Orchard.Core.Common.Drivers {
|
||||
.SetAttributeValue("ModifiedUtc", XmlConvert.ToString(part.ModifiedUtc.Value, XmlDateTimeSerializationMode.Utc));
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Cloning(CommonPart originalPart, CommonPart clonePart, CloneContentContext context) {
|
||||
clonePart.Container = originalPart.Container;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,10 +45,13 @@ namespace Orchard.Core.Common.Drivers {
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, dynamic shapeHelper) {
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
var text = part.IsNew() ? settings.DefaultValue : field.Value;
|
||||
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(),
|
||||
Text = text,
|
||||
Settings = settings,
|
||||
ContentItem = part.ContentItem
|
||||
};
|
||||
|
||||
@@ -58,28 +61,15 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(),
|
||||
ContentItem = part.ContentItem
|
||||
};
|
||||
var viewModel = new TextFieldDriverViewModel();
|
||||
|
||||
if (updater.TryUpdateModel(viewModel, GetPrefix(field, part), null, null)) {
|
||||
if (viewModel.Settings.Required && string.IsNullOrWhiteSpace(viewModel.Text)) {
|
||||
updater.AddModelError("Text", T("The field {0} is mandatory", T(field.DisplayName)));
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part)));
|
||||
}
|
||||
|
||||
field.Value = viewModel.Text;
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
|
||||
if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) {
|
||||
field.Value = settings.DefaultValue;
|
||||
}
|
||||
else {
|
||||
field.Value = viewModel.Text;
|
||||
field.Value = viewModel.Text;
|
||||
|
||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
||||
updater.AddModelError("Text", T("The field {0} is mandatory", T(field.DisplayName)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +88,10 @@ namespace Orchard.Core.Common.Drivers {
|
||||
context.Element(field.FieldDefinition.Name + "." + field.Name).SetAttributeValue("Text", field.Value);
|
||||
}
|
||||
|
||||
protected override void Cloning(ContentPart part, TextField originalField, TextField cloneField, CloneContentContext context) {
|
||||
cloneField.Value = originalField.Value;
|
||||
}
|
||||
|
||||
protected override void Describe(DescribeMembersContext context) {
|
||||
context
|
||||
.Member(null, typeof(string), T("Value"), T("The text associated with the field."))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
|
||||
FeatureDescription: Core content parts.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldSettingsEventsViewModel
|
||||
|
||||
@* This is a token-less default value editor that can be overridden from features that can depend on Orchard.Tokens. *@
|
||||
|
||||
<label for="@Html.FieldIdFor(m => m.Settings.DefaultValue)">@T("Default value")</label>
|
||||
@Html.TextBoxFor(m => m.Settings.DefaultValue, new { @class = "text large" })
|
||||
<span class="hint">@T("Default value for the field. If there is no value given for the actual field, this will be filled in. (optional)")</span>
|
||||
<span class="hint">@T("The default value proposed when creating a content item. (optional)")</span>
|
||||
@Html.ValidationMessageFor(m => m.Settings.DefaultValue)
|
||||
@@ -14,7 +14,4 @@
|
||||
@if (HasText(Model.Settings.Hint)) {
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
}
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Settings.DefaultValue)) {
|
||||
<span class="hint">@T("If the field is left empty then the default value will be used.")</span>
|
||||
}
|
||||
</fieldset>
|
||||
@@ -1,66 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Containers.Extensions;
|
||||
using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Contents;
|
||||
using Orchard.Core.Feeds;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Containers.Controllers {
|
||||
|
||||
public class ItemController : Controller {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ISiteService _siteService;
|
||||
private readonly IFeedManager _feedManager;
|
||||
|
||||
public ItemController(
|
||||
IContentManager contentManager,
|
||||
IShapeFactory shapeFactory,
|
||||
ISiteService siteService,
|
||||
IFeedManager feedManager,
|
||||
IOrchardServices services) {
|
||||
|
||||
_contentManager = contentManager;
|
||||
_siteService = siteService;
|
||||
_feedManager = feedManager;
|
||||
Shape = shapeFactory;
|
||||
Services = services;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; private set; }
|
||||
|
||||
public Localizer T { get; set; }
|
||||
[Themed]
|
||||
public ActionResult Display(int id, PagerParameters pagerParameters) {
|
||||
var container = _contentManager
|
||||
.Get(id, VersionOptions.Published)
|
||||
.As<ContainerPart>();
|
||||
|
||||
if (container == null) {
|
||||
return HttpNotFound(T("Container not found").Text);
|
||||
}
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ViewContent, container, T("Cannot view content"))) {
|
||||
return new HttpUnauthorizedResult();
|
||||
}
|
||||
|
||||
// TODO: (PH) Find a way to apply PagerParameters via a driver so we can lose this controller
|
||||
container.PagerParameters = pagerParameters;
|
||||
var model = _contentManager.BuildDisplay(container);
|
||||
|
||||
return new ShapeResult(this, model);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Orchard.ContentManagement;
|
||||
@@ -27,8 +28,8 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
private readonly IContainerService _containerService;
|
||||
|
||||
public ContainerPartDriver(
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
ISiteService siteService,
|
||||
IFeedManager feedManager, IContainerService containerService) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
@@ -47,7 +48,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
if (!part.ItemsShown)
|
||||
return null;
|
||||
|
||||
return ContentShape("Parts_Container_Contained", () => {
|
||||
return ContentShape("Parts_Container_Contained", () => {
|
||||
var container = part.ContentItem;
|
||||
var query = _contentManager
|
||||
.Query(VersionOptions.Published)
|
||||
@@ -55,13 +56,26 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
.Join<ContainablePartRecord>().OrderByDescending(x => x.Position);
|
||||
|
||||
var metadata = container.ContentManager.GetItemMetadata(container);
|
||||
if (metadata!=null)
|
||||
_feedManager.Register(metadata.DisplayText, "rss", new RouteValueDictionary { { "containerid", container.Id } });
|
||||
if (metadata != null) {
|
||||
_feedManager.Register(metadata.DisplayText, "rss", new RouteValueDictionary {{"containerid", container.Id}});
|
||||
}
|
||||
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), part.PagerParameters);
|
||||
pager.PageSize = part.PagerParameters.PageSize != null && part.Paginated
|
||||
? pager.PageSize
|
||||
: part.PageSize;
|
||||
// Retrieving pager parameters.
|
||||
var queryString = _orchardServices.WorkContext.HttpContext.Request.QueryString;
|
||||
|
||||
var page = 0;
|
||||
// Don't try to page if not necessary.
|
||||
if (part.Paginated && queryString["page"] != null) {
|
||||
Int32.TryParse(queryString["page"], out page);
|
||||
}
|
||||
|
||||
var pageSize = part.PageSize;
|
||||
// If the container is paginated and pageSize is provided in the query string then retrieve it.
|
||||
if (part.Paginated && queryString["pageSize"] != null) {
|
||||
Int32.TryParse(queryString["pageSize"], out pageSize);
|
||||
}
|
||||
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), page, pageSize);
|
||||
|
||||
var pagerShape = shapeHelper.Pager(pager).TotalItemCount(query.Count());
|
||||
var startIndex = part.Paginated ? pager.GetStartIndex() : 0;
|
||||
@@ -88,7 +102,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
|
||||
protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_Container_Edit", () => {
|
||||
if(!part.ContainerSettings.DisplayContainerEditor) {
|
||||
if (!part.ContainerSettings.DisplayContainerEditor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -107,7 +121,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
EnablePositioning = part.Record.EnablePositioning,
|
||||
OverrideEnablePositioning = part.ContainerSettings.EnablePositioning == null
|
||||
};
|
||||
|
||||
|
||||
if (updater != null) {
|
||||
if (updater.TryUpdateModel(model, "Container", null, new[] { "OverrideEnablePositioning" })) {
|
||||
part.AdminMenuPosition = model.AdminMenuPosition;
|
||||
@@ -127,7 +141,7 @@ namespace Orchard.Core.Containers.Drivers {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Container", Model: model, Prefix: "Container");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Containers.Services;
|
||||
using Orchard.Core.Containers.Settings;
|
||||
using Orchard.Data;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Orchard.Core.Containers.Handlers {
|
||||
public class ContainerPartHandler : ContentHandler {
|
||||
@@ -35,14 +34,6 @@ namespace Orchard.Core.Containers.Handlers {
|
||||
|
||||
});
|
||||
|
||||
OnGetContentItemMetadata<ContainerPart>((context, part) => {
|
||||
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Containers"},
|
||||
{"Controller", "Item"},
|
||||
{"Action", "Display"},
|
||||
{"id", context.ContentItem.Id}
|
||||
};
|
||||
});
|
||||
|
||||
OnActivated<ContainerPart>((context, part) => {
|
||||
part.ContainerSettingsField.Loader(() => part.Settings.GetModel<ContainerTypePartSettings>());
|
||||
|
||||
@@ -71,12 +71,6 @@ namespace Orchard.Core.Containers.Models {
|
||||
get { return Record.ItemCount; }
|
||||
set { Record.ItemCount = value; }
|
||||
}
|
||||
|
||||
public PagerParameters PagerParameters { get; set; }
|
||||
|
||||
public ContainerPart() {
|
||||
PagerParameters = new PagerParameters();
|
||||
}
|
||||
}
|
||||
|
||||
public class ContainerPartRecord : ContentPartRecord {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
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.
|
||||
|
||||
@@ -383,26 +383,24 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Clone(int id, string returnUrl) {
|
||||
var contentItem = _contentManager.GetLatest(id);
|
||||
public ActionResult Clone(int id) {
|
||||
var originalContentItem = _contentManager.GetLatest(id);
|
||||
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't clone content")))
|
||||
if (!Services.Authorizer.Authorize(Permissions.ViewContent, originalContentItem, T("Couldn't open original content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
try {
|
||||
Services.ContentManager.Clone(contentItem);
|
||||
}
|
||||
catch (InvalidOperationException) {
|
||||
Services.Notifier.Warning(T("Could not clone the content item."));
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("List"));
|
||||
}
|
||||
// pass a dummy content to the authorization check to check for "own" variations
|
||||
var dummyContent = _contentManager.New(originalContentItem.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, dummyContent, T("Couldn't create clone content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var cloneContentItem = _contentManager.Clone(originalContentItem);
|
||||
|
||||
Services.Notifier.Success(T("Successfully cloned. The clone was saved as a draft."));
|
||||
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("List"));
|
||||
var adminRouteValues = _contentManager.GetItemMetadata(cloneContentItem).AdminRouteValues;
|
||||
return RedirectToRoute(adminRouteValues);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The contents module enables the creation of custom content types.
|
||||
Features:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Layout.Title = T("New {0}", Html.Raw(typeDisplayName)).Text;
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data", @class = "no-multisubmit" })) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Layout.Title = pageTitle;
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data", @class= "no-multisubmit" })) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Core.Contents
|
||||
@using Orchard.Utility.Extensions
|
||||
@{
|
||||
ContentPart contentPart = Model.ContentPart;
|
||||
}
|
||||
@if (Authorizer.Authorize(Permissions.EditContent, contentPart)) {
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.ToUrlString(), Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
@T(" | ")
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
|
||||
FeatureDescription: Standard admin dashboard.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Feeds module is providing RSS feeds to content items.
|
||||
FeatureDescription: RSS feeds for content items.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
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.
|
||||
|
||||
@@ -11,3 +11,7 @@
|
||||
@Display(Model.Sidebar)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!String.IsNullOrWhiteSpace(Request.QueryString["returnUrl"])) {
|
||||
@Html.Hidden("returnUrl", Request.QueryString["returnUrl"])
|
||||
}
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
<Compile Include="Common\ViewModels\DateTimeEditor.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldDriverViewModel.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldSettingsEventsViewModel.cs" />
|
||||
<Compile Include="Containers\Controllers\ItemController.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainablePartDriver.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainerPartDriver.cs" />
|
||||
<Compile Include="Common\Migrations.cs" />
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The scheduling module enables background task scheduling.
|
||||
FeatureDescription: Scheduled background tasks.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The settings module creates site settings that other modules can contribute to.
|
||||
FeatureDescription: Site settings.
|
||||
|
||||
@@ -455,12 +455,12 @@ namespace Orchard.Core.Shapes {
|
||||
var appPath = httpContext == null || httpContext.Request == null
|
||||
? null
|
||||
: httpContext.Request.ApplicationPath;
|
||||
|
||||
var ssl = httpContext?.Request?.IsSecureConnection ?? false;
|
||||
foreach (var context in requiredResources.Where(r =>
|
||||
(includeLocation.HasValue ? r.Settings.Location == includeLocation.Value : true) &&
|
||||
(excludeLocation.HasValue ? r.Settings.Location != excludeLocation.Value : true))) {
|
||||
|
||||
var path = context.GetResourceUrl(defaultSettings, appPath);
|
||||
var path = context.GetResourceUrl(defaultSettings, appPath, ssl);
|
||||
var condition = context.Settings.Condition;
|
||||
var attributes = context.Settings.HasAttributes ? context.Settings.Attributes : null;
|
||||
IHtmlString result;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The shapes module contains core shape templates and display hooks.
|
||||
FeatureDescription: Core shape templates and display hooks.
|
||||
|
||||
@@ -52,5 +52,9 @@ namespace Orchard.Core.Title.Drivers {
|
||||
protected override void Exporting(TitlePart part, ExportContentContext context) {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Title", part.Title);
|
||||
}
|
||||
|
||||
protected override void Cloning(TitlePart originalPart, TitlePart clonePart, CloneContentContext context) {
|
||||
clonePart.Title = originalPart.Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The title module enables content items to have titles.
|
||||
FeatureDescription: Title content part.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
|
||||
FeatureDescription: XML-RPC opt-in implementation.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Lucene.Models {
|
||||
_score = score;
|
||||
}
|
||||
|
||||
public int ContentItemId { get { return int.Parse(GetString("id")); } }
|
||||
public int ContentItemId { get { return GetInt("id"); } }
|
||||
|
||||
public int GetInt(string name) {
|
||||
var field = _doc.GetField(name);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
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.
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,10 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MarkdownSharp, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\StackExchange.MarkdownSharp.1.5.1.0\lib\net35\MarkdownSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -150,7 +154,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Handlers\MarkdownSiteSettingsPartHandler.cs" />
|
||||
<Compile Include="Markdown.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\MarkdownSiteSettingsPart.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
|
||||
FeatureDescription: Markdown editor.
|
||||
|
||||
@@ -26,6 +26,6 @@ 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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
<package id="StackExchange.MarkdownSharp" version="1.5.1.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Tasks;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.Alias.Implementation.Updater {
|
||||
public class AliasHolderUpdaterTask : IOrchardShellEvents, IBackgroundTask {
|
||||
private readonly IAliasHolderUpdater _aliasHolderUpdater;
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public AliasHolderUpdaterTask(IAliasHolderUpdater aliasHolderUpdater) {
|
||||
_aliasHolderUpdater = aliasHolderUpdater;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Activated() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Terminating() {
|
||||
}
|
||||
|
||||
private void Refresh() {
|
||||
try {
|
||||
_aliasHolderUpdater.Refresh();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Logger.Error(ex, "Exception during Alias refresh");
|
||||
}
|
||||
}
|
||||
|
||||
public void Sweep() {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ Name: Alias
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Maps friendly urls to specific module actions.
|
||||
FeatureDescription: Maps friendly urls to specific module actions.
|
||||
|
||||
@@ -41,14 +41,14 @@ namespace Orchard.Alias.Navigation {
|
||||
var urlLevel = endsWithSlash ? requestUrl.Count(l => l == '/') - 1 : requestUrl.Count(l => l == '/');
|
||||
var menuLevel = menuPosition.Count(l => l == '.');
|
||||
|
||||
// Checking menu item if it's the leaf element or it's an intermediate element
|
||||
// Checking the menu item whether it's the leaf element or it's an intermediate element
|
||||
// or it's an unneccessary element according to the url.
|
||||
RouteValueDictionary contentRoute;
|
||||
if (menuLevel == urlLevel) {
|
||||
contentRoute = request.RequestContext.RouteData.Values;
|
||||
}
|
||||
else {
|
||||
// If menuLevel doesn't equal with urlLevel it can mean that this menu item is
|
||||
// If menuLevel doesn't equal to urlLevel it can mean that this menu item is
|
||||
// an intermediate element (the difference is a positive value) or this menu
|
||||
// item is lower in the navigation hierarchy according to the url (negative
|
||||
// value). If the value is negative, removing the menu item, if the value
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
<Compile Include="Implementation\Holder\IAliasHolder.cs" />
|
||||
<Compile Include="Implementation\Map\AliasMap.cs" />
|
||||
<Compile Include="Implementation\Storage\AliasStorage.cs" />
|
||||
<Compile Include="Implementation\Updater\AliasHolderUpdaterTask.cs" />
|
||||
<Compile Include="Implementation\Utils.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Recipes\Builders\AliasStep.cs" />
|
||||
@@ -195,4 +194,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Name: AntiSpam
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides anti-spam services to protect your content from malicious submissions.
|
||||
Features:
|
||||
|
||||
@@ -29,6 +29,6 @@ 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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Path: ArchiveLater
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The ArchiveLater module introduces scheduled archiving functionality.
|
||||
FeatureDescription: Scheduled archiving.
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides a log for recording and viewing back-end changes.
|
||||
Features:
|
||||
@@ -19,7 +19,7 @@ Features:
|
||||
Name: Audit Trail Trimming
|
||||
Description: Provides a background task that regularly deletes old audit trail records.
|
||||
Category: Security
|
||||
Dependencies: Orchard.AuditTrail, Orchard.TaskLease
|
||||
Dependencies: Orchard.AuditTrail
|
||||
Orchard.AuditTrail.Users:
|
||||
Name: Audit Trail User Events
|
||||
Description: Provides audit trail support for user related events.
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
</Content>
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Parts.Contents.AuditTrail.SummaryAdmin.cshtml" />
|
||||
<Content Include="Views\DefinitionTemplates\AuditTrailPartSettings.cshtml" />
|
||||
@@ -213,10 +213,6 @@
|
||||
<Project>{d10ad48f-407d-4db5-a328-173ec7cb010f}</Project>
|
||||
<Name>Orchard.Roles</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.TaskLease\Orchard.TaskLease.csproj">
|
||||
<Project>{3f72a4e9-7b72-4260-b010-c16ec54f9baf}</Project>
|
||||
<Name>Orchard.TaskLease</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Users\Orchard.Users.csproj">
|
||||
<Project>{79aed36e-abd0-4747-93d3-8722b042454b}</Project>
|
||||
<Name>Orchard.Users</Name>
|
||||
|
||||
@@ -32,6 +32,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.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -34,7 +34,10 @@ namespace Orchard.AuditTrail.Providers.Content {
|
||||
protected override void Updating(UpdateContentContext context) {
|
||||
var contentItem = context.ContentItem;
|
||||
|
||||
_ignoreExportHandlerFor = contentItem;
|
||||
if (contentItem.IsNew())
|
||||
return;
|
||||
|
||||
_ignoreExportHandlerFor = contentItem;
|
||||
_previousVersionXml = _contentItemCreated
|
||||
? default(XElement) // No need to do a diff on a newly created content item.
|
||||
: _contentManager.Export(contentItem);
|
||||
@@ -43,7 +46,10 @@ namespace Orchard.AuditTrail.Providers.Content {
|
||||
|
||||
protected override void Updated(UpdateContentContext context) {
|
||||
var contentItem = context.ContentItem;
|
||||
|
||||
|
||||
if (contentItem.IsNew())
|
||||
return;
|
||||
|
||||
if (_contentItemCreated) {
|
||||
RecordAuditTrailEvent(ContentAuditTrailEventProvider.Created, context.ContentItem);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user