mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
71 Commits
feature/68
...
feature/de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6862637b69 | ||
|
|
f519bc96ed | ||
|
|
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 | ||
|
|
48ccada654 | ||
|
|
2b3451cd13 | ||
|
|
e962410a72 | ||
|
|
8c97c89414 | ||
|
|
b740bae395 | ||
|
|
cf8f4d5388 | ||
|
|
835ff95664 | ||
|
|
3df81980b3 | ||
|
|
c0ac53078c | ||
|
|
162be51ad9 | ||
|
|
dd59417c4a | ||
|
|
847364bbd2 |
@@ -31,6 +31,6 @@ IF "%solution%" == "" SET solution=src\Orchard.sln
|
||||
|
||||
lib\nuget\nuget.exe restore %solution%
|
||||
|
||||
msbuild /t:%target% %project% /p:Solution=%solution%
|
||||
msbuild /t:%target% %project% /p:Solution=%solution% /m
|
||||
|
||||
pause
|
||||
@@ -56,4 +56,4 @@ There are many ways you can [contribute to Orchard](http://orchardproject.net/co
|
||||
|
||||
## 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
|
||||
|
||||
@@ -11,6 +11,7 @@ var fs = require("fs"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
cssnano = require("gulp-cssnano"),
|
||||
sass = require("gulp-sass"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
@@ -131,7 +132,7 @@ 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;
|
||||
@@ -148,6 +149,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 +177,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" +
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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 used on creation
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
@@ -63,40 +63,14 @@ Scenario: Creating and using Boolean fields
|
||||
Then I should see "checked=\"checked\""
|
||||
|
||||
# The value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
| Fields[0].BooleanFieldSettings.DefaultValue | Neutral |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.NotSetLabel | May be |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.SelectionMode | Radiobutton |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Active.Value | |
|
||||
And I hit "Save"
|
||||
Then I should see "The field Active is mandatory."
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.Optional | false |
|
||||
| Fields[0].BooleanFieldSettings.DefaultValue | True |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].BooleanFieldSettings.SelectionMode | Dropdown list |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Active.Value | |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
And I should see "selected=\"selected\" value=\"true\""
|
||||
Then I should see "The field Active is mandatory."
|
||||
83
src/Orchard.Specs/Boolean.feature.cs
generated
83
src/Orchard.Specs/Boolean.feature.cs
generated
@@ -193,90 +193,25 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table6.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.Optional",
|
||||
"false"});
|
||||
table6.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.DefaultValue",
|
||||
"Neutral"});
|
||||
#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 71
|
||||
"Event.Active.Value",
|
||||
""});
|
||||
#line 72
|
||||
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 74
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 77
|
||||
#line 75
|
||||
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 hidden
|
||||
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table9.AddRow(new string[] {
|
||||
"Event.Active.Value",
|
||||
""});
|
||||
#line 79
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 82
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 83
|
||||
#line 76
|
||||
testRunner.Then("I should see \"The field Active is mandatory.\"", ((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 table10 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.Optional",
|
||||
"false"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.DefaultValue",
|
||||
"True"});
|
||||
#line 87
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].BooleanFieldSettings.SelectionMode",
|
||||
"Dropdown list"});
|
||||
#line 91
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 94
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 95
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Event.Active.Value",
|
||||
""});
|
||||
#line 96
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 99
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 100
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 101
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 102
|
||||
testRunner.And("I should see \"selected=\\\"selected\\\" value=\\\"true\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -139,67 +139,22 @@ Scenario: Creating and using Date fields
|
||||
When I hit "Save"
|
||||
Then I should see "Date of the event is required."
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
# 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.Required | false |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Date | 01/31/2012 |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Time | 11:00 AM |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.EventDate.Editor.Date | |
|
||||
| Event.EventDate.Editor.Time | |
|
||||
And 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/2012 11:00"
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Date | 01/31/2012 |
|
||||
| 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 fill in
|
||||
| name | value |
|
||||
| Event.EventDate.Editor.Date | |
|
||||
| Event.EventDate.Editor.Time | |
|
||||
And I hit "Save"
|
||||
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/2012 10:00"
|
||||
|
||||
# If required and the default value is incomplete, the value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].DateTimeFieldSettings.Display | DateAndTime |
|
||||
| Fields[0].DateTimeFieldSettings.Required | true |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Date | |
|
||||
| Fields[0].DateTimeFieldSettings.Editor.Time | 12:00 AM |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Event.EventDate.Editor.Date"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.EventDate.Editor.Date | |
|
||||
| Event.EventDate.Editor.Time | |
|
||||
And I hit "Save"
|
||||
Then I should see "Date of the event is required."
|
||||
And I should see "1/31/2016 10:00"
|
||||
|
||||
Scenario: Creating and using date time fields in another culture
|
||||
|
||||
|
||||
237
src/Orchard.Specs/DateTime.feature.cs
generated
237
src/Orchard.Specs/DateTime.feature.cs
generated
@@ -359,139 +359,32 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"false"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Date",
|
||||
"01/31/2012"});
|
||||
"01/31/2016"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Time",
|
||||
"11:00 AM"});
|
||||
#line 144
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 150
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 151
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 152
|
||||
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table16.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
""});
|
||||
table16.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
""});
|
||||
#line 153
|
||||
testRunner.When("I fill in", ((string)(null)), table16, "When ");
|
||||
#line 157
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 158
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 159
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 160
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 161
|
||||
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 162
|
||||
testRunner.And("I should see \"1/31/2012 11:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 165
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Date",
|
||||
"01/31/2012"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Time",
|
||||
"10:00 AM"});
|
||||
#line 166
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 172
|
||||
#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 173
|
||||
#line 150
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 174
|
||||
#line 151
|
||||
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table18.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
""});
|
||||
table18.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
""});
|
||||
#line 175
|
||||
testRunner.When("I fill in", ((string)(null)), table18, "When ");
|
||||
#line 179
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 180
|
||||
#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 181
|
||||
#line 154
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 182
|
||||
#line 155
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 183
|
||||
#line 156
|
||||
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 184
|
||||
testRunner.And("I should see \"1/31/2012 10:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 187
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Date",
|
||||
""});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Editor.Time",
|
||||
"12:00 AM"});
|
||||
#line 188
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 194
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 195
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 196
|
||||
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
""});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
""});
|
||||
#line 197
|
||||
testRunner.When("I fill in", ((string)(null)), table20, "When ");
|
||||
#line 201
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 202
|
||||
testRunner.Then("I should see \"Date of the event is required.\"", ((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();
|
||||
}
|
||||
@@ -501,119 +394,119 @@ 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 204
|
||||
#line 159
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 207
|
||||
#line 162
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 208
|
||||
#line 163
|
||||
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 209
|
||||
#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 210
|
||||
#line 165
|
||||
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 211
|
||||
#line 166
|
||||
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 212
|
||||
#line 167
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table21 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table21.AddRow(new string[] {
|
||||
table16.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Event"});
|
||||
table21.AddRow(new string[] {
|
||||
table16.AddRow(new string[] {
|
||||
"Name",
|
||||
"Event"});
|
||||
#line 213
|
||||
testRunner.And("I fill in", ((string)(null)), table21, "And ");
|
||||
#line 217
|
||||
#line 168
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 172
|
||||
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 218
|
||||
#line 173
|
||||
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 219
|
||||
#line 174
|
||||
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 222
|
||||
#line 177
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 223
|
||||
#line 178
|
||||
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table22 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table22.AddRow(new string[] {
|
||||
table17.AddRow(new string[] {
|
||||
"DisplayName",
|
||||
"Date of the event"});
|
||||
table22.AddRow(new string[] {
|
||||
table17.AddRow(new string[] {
|
||||
"Name",
|
||||
"EventDate"});
|
||||
table22.AddRow(new string[] {
|
||||
table17.AddRow(new string[] {
|
||||
"FieldTypeName",
|
||||
"DateTimeField"});
|
||||
#line 224
|
||||
testRunner.And("I fill in", ((string)(null)), table22, "And ");
|
||||
#line 229
|
||||
#line 179
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 184
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 230
|
||||
#line 185
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 231
|
||||
#line 186
|
||||
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 234
|
||||
#line 189
|
||||
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 235
|
||||
#line 190
|
||||
testRunner.And("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table23 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table23.AddRow(new string[] {
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Display",
|
||||
"DateAndTime"});
|
||||
table23.AddRow(new string[] {
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].DateTimeFieldSettings.Required",
|
||||
"true"});
|
||||
#line 236
|
||||
testRunner.And("I fill in", ((string)(null)), table23, "And ");
|
||||
#line 240
|
||||
#line 191
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 195
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 241
|
||||
#line 196
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table24 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table24.AddRow(new string[] {
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"01/31/2012"});
|
||||
table24.AddRow(new string[] {
|
||||
table19.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"12:00 AM"});
|
||||
#line 242
|
||||
testRunner.And("I fill in", ((string)(null)), table24, "And ");
|
||||
#line 246
|
||||
#line 197
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 201
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 247
|
||||
#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 248
|
||||
#line 203
|
||||
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table25 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table25.AddRow(new string[] {
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Date",
|
||||
"31/01/2012"});
|
||||
table25.AddRow(new string[] {
|
||||
table20.AddRow(new string[] {
|
||||
"Event.EventDate.Editor.Time",
|
||||
"18:00"});
|
||||
#line 249
|
||||
testRunner.And("I fill in", ((string)(null)), table25, "And ");
|
||||
#line 253
|
||||
#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 254
|
||||
#line 209
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 255
|
||||
#line 210
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -108,7 +108,7 @@ Scenario: Creating and using Enumeration fields
|
||||
And I hit "Save"
|
||||
Then I should see "The field Location is mandatory."
|
||||
|
||||
# The default value should be used on creation
|
||||
# The default value should be proposed on creation
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
@@ -118,84 +118,23 @@ Scenario: Creating and using Enumeration fields
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "selected=\"selected">Seattle"
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | false |
|
||||
| Fields[0].EnumerationFieldSettings.Options | Boston |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Checkbox |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | foo;Boston;bar |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Location"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Location.SelectedValues | |
|
||||
And 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 "Location:"
|
||||
And I should see "Boston"
|
||||
|
||||
# If required and no value, the default value 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.Options | Phoenix |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Checkbox |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | foo;Phoenix;bar |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Location"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Location.SelectedValues | |
|
||||
And 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 "Location:"
|
||||
And I should see "Phoenix"
|
||||
|
||||
# If required and the default value is not valid, the value should be required
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].EnumerationFieldSettings.Required | true |
|
||||
| Fields[0].EnumerationFieldSettings.Options | Phoenix |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Checkbox |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | foo;bar |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "Location"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Location.SelectedValues | |
|
||||
And I hit "Save"
|
||||
Then I should see "The field Location is mandatory."
|
||||
|
||||
# If required and no default value, the list box should have the required attribute
|
||||
# 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 |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# If required and a default value is set, the list box should not have the required attribute
|
||||
# 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 | true |
|
||||
| Fields[0].EnumerationFieldSettings.Required | false |
|
||||
| Fields[0].EnumerationFieldSettings.ListMode | Listbox |
|
||||
| Fields[0].EnumerationFieldSettings.DefaultValue | Phoenix |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
|
||||
173
src/Orchard.Specs/Enumeration.feature.cs
generated
173
src/Orchard.Specs/Enumeration.feature.cs
generated
@@ -304,176 +304,37 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"false"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Options",
|
||||
"Boston"});
|
||||
"true"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Checkbox"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"foo;Boston;bar"});
|
||||
"Listbox"});
|
||||
#line 124
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 130
|
||||
#line 128
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 131
|
||||
#line 129
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 132
|
||||
testRunner.Then("I should see \"Location\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#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[] {
|
||||
"Event.Location.SelectedValues",
|
||||
""});
|
||||
#line 133
|
||||
testRunner.When("I fill in", ((string)(null)), table13, "When ");
|
||||
#line 136
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 137
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
"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.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 140
|
||||
testRunner.Then("I should see \"Location:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 141
|
||||
testRunner.And("I should see \"Boston\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 144
|
||||
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].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Options",
|
||||
"Phoenix"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Checkbox"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"foo;Phoenix;bar"});
|
||||
#line 145
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 151
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 152
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 153
|
||||
testRunner.Then("I should see \"Location\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Event.Location.SelectedValues",
|
||||
""});
|
||||
#line 154
|
||||
testRunner.When("I fill in", ((string)(null)), table15, "When ");
|
||||
#line 157
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 158
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 159
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 160
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 161
|
||||
testRunner.Then("I should see \"Location:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 162
|
||||
testRunner.And("I should see \"Phoenix\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 165
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table16.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table16.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Options",
|
||||
"Phoenix"});
|
||||
table16.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Checkbox"});
|
||||
table16.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"foo;bar"});
|
||||
#line 166
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 172
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 173
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 174
|
||||
testRunner.Then("I should see \"Location\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"Event.Location.SelectedValues",
|
||||
""});
|
||||
#line 175
|
||||
testRunner.When("I fill in", ((string)(null)), table17, "When ");
|
||||
#line 178
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 179
|
||||
testRunner.Then("I should see \"The field Location is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 182
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
""});
|
||||
#line 183
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 188
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 189
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 190
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 193
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.Required",
|
||||
"true"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.ListMode",
|
||||
"Listbox"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].EnumerationFieldSettings.DefaultValue",
|
||||
"Phoenix"});
|
||||
#line 194
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 199
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 200
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 201
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -129,58 +129,29 @@ Scenario: Creating and using Input fields
|
||||
Then I should see "Contact:"
|
||||
And I should see "contact@orchardproject.net"
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
# 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.Required | false |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact1@orchardproject.net |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact@orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Contact.Value | |
|
||||
And 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 "Contact:"
|
||||
And I should see "contact1@orchardproject.net"
|
||||
Then I should see "value=\"contact@orchardproject.net\""
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].InputFieldSettings.Required | true |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact2@orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Contact.Value | |
|
||||
And 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 "Contact:"
|
||||
And I should see "contact2@orchardproject.net"
|
||||
|
||||
# If required and no default value, the required attribute should be used
|
||||
# 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 |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# If required and a default value is set, the required attribute should not be used
|
||||
# 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 | true |
|
||||
| Fields[0].InputFieldSettings.DefaultValue | contact@orchardproject.net |
|
||||
| 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\""
|
||||
101
src/Orchard.Specs/Input.feature.cs
generated
101
src/Orchard.Specs/Input.feature.cs
generated
@@ -303,39 +303,34 @@ this.ScenarioSetup(scenarioInfo);
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"false"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
"contact1@orchardproject.net"});
|
||||
"contact@orchardproject.net"});
|
||||
#line 134
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 138
|
||||
#line 137
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 139
|
||||
#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[] {
|
||||
"Event.Contact.Value",
|
||||
""});
|
||||
#line 140
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
#line 143
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 144
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 145
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 146
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 147
|
||||
testRunner.Then("I should see \"Contact:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 148
|
||||
testRunner.And("I should see \"contact1@orchardproject.net\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
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
|
||||
@@ -344,76 +339,14 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
"contact2@orchardproject.net"});
|
||||
"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 hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 157
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((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[] {
|
||||
"Event.Contact.Value",
|
||||
""});
|
||||
#line 158
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 161
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 162
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 163
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 164
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 165
|
||||
testRunner.Then("I should see \"Contact:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 166
|
||||
testRunner.And("I should see \"contact2@orchardproject.net\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 169
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
""});
|
||||
#line 170
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 174
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 175
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 176
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 179
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.Required",
|
||||
"true"});
|
||||
table18.AddRow(new string[] {
|
||||
"Fields[0].InputFieldSettings.DefaultValue",
|
||||
"contact@orchardproject.net"});
|
||||
#line 180
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 184
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 185
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 186
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -69,64 +69,29 @@ Scenario: Creating and using Link fields
|
||||
And I hit "Save"
|
||||
Then I should see "Url is required for Site Url."
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
# 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.Required | false |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | http://www.orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.SiteUrl.Value | |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.SiteUrl.Text | Orchard1 |
|
||||
And 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 "Site Url:"
|
||||
And I should see "<a href=\"http://www.orchardproject.net\">Orchard1</a>"
|
||||
Then I should see "value=\"http://www.orchardproject.net\""
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].LinkFieldSettings.Required | true |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | http://www.orchardproject.net |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.SiteUrl.Value | |
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.SiteUrl.Text | Orchard2 |
|
||||
And 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 "Site Url:"
|
||||
And I should see "<a href=\"http://www.orchardproject.net\">Orchard2</a>"
|
||||
|
||||
# If required and no default value, the required attribute should be used
|
||||
# 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 |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# If required and a default value is set, the required attribute should not be used
|
||||
# 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 | true |
|
||||
| Fields[0].LinkFieldSettings.DefaultValue | http://www.orchardproject.net |
|
||||
| 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\""
|
||||
129
src/Orchard.Specs/Link.feature.cs
generated
129
src/Orchard.Specs/Link.feature.cs
generated
@@ -210,135 +210,50 @@ this.ScenarioSetup(scenarioInfo);
|
||||
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"false"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
"http://www.orchardproject.net"});
|
||||
#line 74
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 78
|
||||
#line 77
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 79
|
||||
#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[] {
|
||||
"Event.SiteUrl.Value",
|
||||
""});
|
||||
#line 80
|
||||
"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[] {
|
||||
"Event.SiteUrl.Text",
|
||||
"Orchard1"});
|
||||
#line 83
|
||||
"Fields[0].LinkFieldSettings.Required",
|
||||
"false"});
|
||||
#line 92
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 86
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 87
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 88
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 89
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 90
|
||||
testRunner.Then("I should see \"Site Url:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 91
|
||||
testRunner.And("I should see \"<a href=\\\"http://www.orchardproject.net\\\">Orchard1</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 94
|
||||
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].LinkFieldSettings.Required",
|
||||
"true"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
"http://www.orchardproject.net"});
|
||||
#line 95
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 99
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 100
|
||||
#line 96
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table12.AddRow(new string[] {
|
||||
"Event.SiteUrl.Value",
|
||||
""});
|
||||
#line 101
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Event.SiteUrl.Text",
|
||||
"Orchard2"});
|
||||
#line 104
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 107
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 108
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 109
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 110
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 111
|
||||
testRunner.Then("I should see \"Site Url:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 112
|
||||
testRunner.And("I should see \"<a href=\\\"http://www.orchardproject.net\\\">Orchard2</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 115
|
||||
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].LinkFieldSettings.Required",
|
||||
"true"});
|
||||
table14.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
""});
|
||||
#line 116
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 120
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 121
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 122
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 125
|
||||
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].LinkFieldSettings.Required",
|
||||
"true"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].LinkFieldSettings.DefaultValue",
|
||||
"http://www.orchardproject.net"});
|
||||
#line 126
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 130
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 131
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 132
|
||||
#line 97
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -99,101 +99,36 @@ Scenario: Creating and using numeric fields
|
||||
And I should see "The value 'b' is not valid for Maximum."
|
||||
|
||||
# The value should be validated
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 4 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
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 or its default value is an invalid number"
|
||||
Then I should see "Guests is an invalid number"
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
# 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.Required | false |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 4 |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 1234 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | |
|
||||
And 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 "Guests:"
|
||||
And I should see "4"
|
||||
Then I should see "value=\"1234\""
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
# 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 |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 5 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | |
|
||||
And 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 "Guests:"
|
||||
And I should see "5"
|
||||
|
||||
# The default value should be validated
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | a |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | |
|
||||
And I hit "Save"
|
||||
Then I should see "Guests or its default value is an invalid number"
|
||||
|
||||
# The default value should be bound
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
| Fields[0].NumericFieldSettings.Minimum | -10 |
|
||||
| Fields[0].NumericFieldSettings.Maximum | 100 |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | -20 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Guests.Value | |
|
||||
And I hit "Save"
|
||||
Then I should see "The value must be greater than -10"
|
||||
|
||||
# If required and no default value, 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 |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# If required and a default value is set, the required attribute should not be used
|
||||
# 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 | true |
|
||||
| Fields[0].NumericFieldSettings.DefaultValue | 6 |
|
||||
| Fields[0].NumericFieldSettings.Required | false |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should not see "required=\"required\""
|
||||
213
src/Orchard.Specs/Numeric.feature.cs
generated
213
src/Orchard.Specs/Numeric.feature.cs
generated
@@ -266,37 +266,38 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#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/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
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[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
table11.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"4"});
|
||||
"Event.Guests.Value",
|
||||
"a"});
|
||||
#line 103
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 107
|
||||
#line 106
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 108
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((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[] {
|
||||
"Event.Guests.Value",
|
||||
"a"});
|
||||
#line 109
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"1234"});
|
||||
#line 111
|
||||
testRunner.And("I fill in", ((string)(null)), table12, "And ");
|
||||
#line 112
|
||||
#line 114
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 113
|
||||
testRunner.Then("I should see \"Guests or its default value is an invalid number\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#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[] {
|
||||
@@ -304,183 +305,31 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"4"});
|
||||
#line 117
|
||||
"true"});
|
||||
#line 120
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 121
|
||||
#line 123
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 122
|
||||
#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[] {
|
||||
"Event.Guests.Value",
|
||||
""});
|
||||
#line 123
|
||||
testRunner.And("I fill in", ((string)(null)), table14, "And ");
|
||||
#line 126
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 127
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 128
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
#line 129
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 130
|
||||
testRunner.Then("I should see \"Guests:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 131
|
||||
testRunner.And("I should see \"4\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
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.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].NumericFieldSettings.Required",
|
||||
"true"});
|
||||
table15.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"5"});
|
||||
#line 135
|
||||
testRunner.And("I fill in", ((string)(null)), table15, "And ");
|
||||
#line 139
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 140
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((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[] {
|
||||
"Event.Guests.Value",
|
||||
""});
|
||||
#line 141
|
||||
testRunner.And("I fill in", ((string)(null)), table16, "And ");
|
||||
#line 144
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 145
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 146
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 147
|
||||
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 148
|
||||
testRunner.Then("I should see \"Guests:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 149
|
||||
testRunner.And("I should see \"5\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 152
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
table17.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"a"});
|
||||
#line 153
|
||||
testRunner.And("I fill in", ((string)(null)), table17, "And ");
|
||||
#line 157
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 158
|
||||
testRunner.And("I go to \"Admin/Contents/Create/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.Guests.Value",
|
||||
""});
|
||||
#line 159
|
||||
testRunner.And("I fill in", ((string)(null)), table18, "And ");
|
||||
#line 162
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 163
|
||||
testRunner.Then("I should see \"Guests or its default value is an invalid number\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 166
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"false"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Minimum",
|
||||
"-10"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Maximum",
|
||||
"100"});
|
||||
table19.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"-20"});
|
||||
#line 167
|
||||
testRunner.And("I fill in", ((string)(null)), table19, "And ");
|
||||
#line 173
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 174
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table20.AddRow(new string[] {
|
||||
"Event.Guests.Value",
|
||||
""});
|
||||
#line 175
|
||||
testRunner.And("I fill in", ((string)(null)), table20, "And ");
|
||||
#line 178
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 179
|
||||
testRunner.Then("I should see \"The value must be greater than -10\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 182
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table21 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table21.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"true"});
|
||||
table21.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
""});
|
||||
#line 183
|
||||
testRunner.And("I fill in", ((string)(null)), table21, "And ");
|
||||
#line 187
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 188
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 189
|
||||
testRunner.Then("I should see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 192
|
||||
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table22 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table22.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.Required",
|
||||
"true"});
|
||||
table22.AddRow(new string[] {
|
||||
"Fields[0].NumericFieldSettings.DefaultValue",
|
||||
"6"});
|
||||
#line 193
|
||||
testRunner.And("I fill in", ((string)(null)), table22, "And ");
|
||||
#line 197
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 198
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 199
|
||||
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">
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -67,60 +67,35 @@ Scenario: Creating and using Text fields
|
||||
Then I should see "Subject"
|
||||
When I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | Orchard Harvest 2013 |
|
||||
And I hit "Save"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
And I should see "Orchard Harvest 2013"
|
||||
|
||||
# If not required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | false |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | Orchard Harvest 2014 |
|
||||
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"
|
||||
And I am redirected
|
||||
Then I should see "Your Event has been created."
|
||||
And I should see "Orchard Harvest 2014"
|
||||
|
||||
# If required and no value, the default value should be used
|
||||
When I go to "Admin/ContentTypes/Edit/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.Required | true |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | Orchard Harvest 2015 |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Event.Subject.Text | |
|
||||
| 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"
|
||||
|
||||
# If required and no default value, the required attribute should be used
|
||||
# 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 |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | |
|
||||
And I hit "Save"
|
||||
And I go to "Admin/Contents/Create/Event"
|
||||
Then I should see "required=\"required\""
|
||||
|
||||
# If required and a default value is set, the required attribute should not be used
|
||||
# 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 | true |
|
||||
| Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue | Orchard Harvest 2015 |
|
||||
| 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\""
|
||||
103
src/Orchard.Specs/Text.feature.cs
generated
103
src/Orchard.Specs/Text.feature.cs
generated
@@ -197,7 +197,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table7.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
"Orchard Harvest 2013"});
|
||||
"Orchard Harvest 2015"});
|
||||
#line 68
|
||||
testRunner.When("I fill in", ((string)(null)), table7, "When ");
|
||||
#line 71
|
||||
@@ -207,43 +207,42 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#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 2013\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
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.Required",
|
||||
"false"});
|
||||
table8.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
"Orchard Harvest 2014"});
|
||||
"Orchard Harvest 2016"});
|
||||
#line 78
|
||||
testRunner.And("I fill in", ((string)(null)), table8, "And ");
|
||||
#line 82
|
||||
#line 81
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 83
|
||||
#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[] {
|
||||
"Event.Subject.Text",
|
||||
""});
|
||||
#line 84
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
#line 87
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 88
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 89
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
testRunner.And("I fill in", ((string)(null)), table9, "And ");
|
||||
#line 90
|
||||
testRunner.And("I should see \"Orchard Harvest 2014\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 93
|
||||
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[] {
|
||||
@@ -251,72 +250,14 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"value"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
table10.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
"Orchard Harvest 2015"});
|
||||
#line 94
|
||||
"false"});
|
||||
#line 96
|
||||
testRunner.And("I fill in", ((string)(null)), table10, "And ");
|
||||
#line 98
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 99
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table11.AddRow(new string[] {
|
||||
"Event.Subject.Text",
|
||||
""});
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 100
|
||||
testRunner.And("I fill in", ((string)(null)), table11, "And ");
|
||||
#line 103
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 104
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 105
|
||||
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 106
|
||||
testRunner.And("I should see \"Orchard Harvest 2015\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 109
|
||||
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].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
table12.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
""});
|
||||
#line 110
|
||||
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 \"required=\\\"required\\\"\"", ((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].TextFieldSettingsEventsViewModel.Settings.Required",
|
||||
"true"});
|
||||
table13.AddRow(new string[] {
|
||||
"Fields[0].TextFieldSettingsEventsViewModel.Settings.DefaultValue",
|
||||
"Orchard Harvest 2015"});
|
||||
#line 120
|
||||
testRunner.And("I fill in", ((string)(null)), table13, "And ");
|
||||
#line 124
|
||||
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 125
|
||||
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 126
|
||||
#line 101
|
||||
testRunner.Then("I should not see \"required=\\\"required\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
|
||||
private void Import(XElement element) {
|
||||
var importContentSession = new ImportContentSession(_contentManager);
|
||||
_contentManager.Import(element, importContentSession);
|
||||
_contentManager.Import(new ImportContentContext(element, null, importContentSession));
|
||||
_contentManager.CompleteImport(element, importContentSession);
|
||||
}
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -65,10 +68,6 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
field.Value = viewModel.Text;
|
||||
|
||||
if (String.IsNullOrWhiteSpace(field.Value) && !String.IsNullOrWhiteSpace(settings.DefaultValue)) {
|
||||
field.Value = settings.DefaultValue;
|
||||
}
|
||||
|
||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
||||
updater.AddModelError("Text", T("The field {0} is mandatory", T(field.DisplayName)));
|
||||
}
|
||||
@@ -89,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)
|
||||
@@ -1,7 +1,5 @@
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldDriverViewModel
|
||||
@{
|
||||
var isRequired = Model.Settings.Required && String.IsNullOrWhiteSpace(Model.Settings.DefaultValue);
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Text)" @if(Model.Settings.Required) { <text>class="required"</text> }>@Model.Field.DisplayName</label>
|
||||
@if (String.IsNullOrWhiteSpace(Model.Settings.Flavor)) {
|
||||
@@ -16,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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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")]
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[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);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,9 @@ namespace Orchard.AuditTrail.Services {
|
||||
case XmlNodeType.Element:
|
||||
var match = reader.GetAttribute("match");
|
||||
var isAttributeChange = match != null && match.StartsWith("@");
|
||||
var index = match == null || isAttributeChange ? default(int?) : Int32.Parse(match) - 1;
|
||||
int matchInt;
|
||||
var index = match == null || isAttributeChange || !Int32.TryParse(match, out matchInt)
|
||||
? default(int?) : matchInt - 1;
|
||||
var diffType = reader.LocalName;
|
||||
var currentElement = stack.Peek();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Name: Autoroute
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Description for the module
|
||||
Features:
|
||||
|
||||
@@ -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: Microsoft Open Technologies, Inc
|
||||
Website: http://msopentech.com
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides integration of Microsoft Azure Media Services functionality into Orchard.
|
||||
Features:
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
@@ -276,7 +276,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="Assets\TypeScript\cloudmedia-videoplayer-data.ts" />
|
||||
<Content Include="Assets\TypeScript\cloudmedia-videoplayer-injectors-dash.ts" />
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<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="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
|
||||
@@ -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 set of Orchard service implementations targeting Microsoft Azure services.
|
||||
Category: Hosting
|
||||
|
||||
@@ -31,6 +31,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 Orchard Blogs module is implementing basic blogging features.
|
||||
FeatureDescription: A simple web log.
|
||||
|
||||
@@ -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")]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: Sébastien Ros
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10
|
||||
Version: 1.10.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides an API to cache business data.
|
||||
Features:
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -31,6 +31,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")]
|
||||
|
||||
|
||||
@@ -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.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
[assembly: AssemblyVersion("1.10.1")]
|
||||
[assembly: AssemblyFileVersion("1.10.1")]
|
||||
|
||||
|
||||
@@ -69,7 +69,9 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
$$FileIncludes$$<ItemGroup>
|
||||
$$CompileIncludes$$
|
||||
$$ContentIncludes$$
|
||||
<ItemGroup>
|
||||
$$OrchardReferences$$
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 34 KiB |
@@ -273,6 +273,7 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
string propertiesPath = modulePath + "Properties";
|
||||
var content = new HashSet<string>();
|
||||
var folders = new HashSet<string>();
|
||||
var compile = new HashSet<string>();
|
||||
|
||||
foreach (var folder in _moduleDirectories) {
|
||||
Directory.CreateDirectory(modulePath + folder);
|
||||
@@ -297,27 +298,29 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
File.WriteAllText(modulePath + "Styles\\Web.config", File.ReadAllText(_codeGenTemplatePath + "StaticFilesWebConfig.txt"));
|
||||
content.Add(modulePath + "Styles\\Web.config");
|
||||
|
||||
string templateText = File.ReadAllText(_codeGenTemplatePath + "ModuleAssemblyInfo.txt");
|
||||
templateText = templateText.Replace("$$ModuleName$$", moduleName);
|
||||
templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString());
|
||||
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
||||
content.Add(propertiesPath + "\\AssemblyInfo.cs");
|
||||
|
||||
templateText = File.ReadAllText(_codeGenTemplatePath + "ModuleManifest.txt");
|
||||
string templateText = File.ReadAllText(_codeGenTemplatePath + "ModuleManifest.txt");
|
||||
templateText = templateText.Replace("$$ModuleName$$", moduleName);
|
||||
File.WriteAllText(modulePath + "Module.txt", templateText, System.Text.Encoding.UTF8);
|
||||
content.Add(modulePath + "Module.txt");
|
||||
|
||||
var itemGroup = CreateProjectItemGroup(modulePath, content, folders);
|
||||
templateText = File.ReadAllText(_codeGenTemplatePath + "ModuleAssemblyInfo.txt");
|
||||
templateText = templateText.Replace("$$ModuleName$$", moduleName);
|
||||
templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString());
|
||||
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
||||
compile.Add(propertiesPath + "\\AssemblyInfo.cs");
|
||||
|
||||
File.WriteAllText(modulePath + moduleName + ".csproj", CreateCsProject(moduleName, projectGuid, itemGroup));
|
||||
var contentItemGroup = CreateProjectItemGroup(modulePath, content, folders);
|
||||
var compileItemGroup = CreateCompileItemGroup(modulePath, compile);
|
||||
|
||||
File.WriteAllText(modulePath + moduleName + ".csproj", CreateCsProject(moduleName, projectGuid, contentItemGroup, compileItemGroup));
|
||||
}
|
||||
|
||||
private static string CreateCsProject(string projectName, string projectGuid, string itemGroup) {
|
||||
private static string CreateCsProject(string projectName, string projectGuid, string contentItemGroup, string compileItemGroup) {
|
||||
string text = File.ReadAllText(_codeGenTemplatePath + "\\ModuleCsProj.txt");
|
||||
text = text.Replace("$$ModuleName$$", projectName);
|
||||
text = text.Replace("$$ModuleProjectGuid$$", projectGuid);
|
||||
text = text.Replace("$$FileIncludes$$", itemGroup ?? "");
|
||||
text = text.Replace("$$ContentIncludes$$", contentItemGroup ?? "");
|
||||
text = text.Replace("$$CompileIncludes$$", compileItemGroup ?? "");
|
||||
text = text.Replace("$$OrchardReferences$$", GetOrchardReferences());
|
||||
return text;
|
||||
}
|
||||
@@ -402,7 +405,7 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
// create new csproj for the theme
|
||||
if (projectGuid != null) {
|
||||
var itemGroup = CreateProjectItemGroup(themePath, createdFiles, createdFolders);
|
||||
string projectText = CreateCsProject(themeName, projectGuid, itemGroup);
|
||||
string projectText = CreateCsProject(themeName, projectGuid, itemGroup, null);
|
||||
File.WriteAllText(themePath + "\\" + themeName + ".csproj", projectText);
|
||||
}
|
||||
|
||||
@@ -464,6 +467,23 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
return string.Format(CultureInfo.InvariantCulture, "<ItemGroup>\r\n{0}\r\n </ItemGroup>\r\n ", contentInclude);
|
||||
}
|
||||
|
||||
private static string CreateCompileItemGroup(string relativeFromPath, HashSet<string> compile) {
|
||||
var compileInclude = "";
|
||||
if (relativeFromPath != null && !relativeFromPath.EndsWith("\\", StringComparison.OrdinalIgnoreCase)) {
|
||||
relativeFromPath += "\\";
|
||||
}
|
||||
else if (relativeFromPath == null) {
|
||||
relativeFromPath = "";
|
||||
}
|
||||
|
||||
if (compile != null && compile.Count > 0) {
|
||||
compileInclude = string.Join("\r\n",
|
||||
from file in compile
|
||||
select " <Compile Include=\"" + file.Replace(relativeFromPath, "") + "\" />");
|
||||
}
|
||||
return string.Format(CultureInfo.InvariantCulture, "<ItemGroup>\r\n{0}\r\n </ItemGroup>\r\n ", compileInclude);
|
||||
}
|
||||
|
||||
private void AddFilesToOrchardThemesProject(TextWriter output, string itemGroup) {
|
||||
if (!File.Exists(_orchardThemesProj)) {
|
||||
output.WriteLine(T("Warning: Orchard.Themes project file could not be found at {0}", _orchardThemesProj));
|
||||
|
||||
@@ -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: Tools to create Orchard components.
|
||||
FeatureDescription: Tools to create Orchard components.
|
||||
|
||||
@@ -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")]
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user