diff --git a/src/Orchard.Specs/Users.feature b/src/Orchard.Specs/Users.feature
index 1e3d598b6..2de8d8a5b 100644
--- a/src/Orchard.Specs/Users.feature
+++ b/src/Orchard.Specs/Users.feature
@@ -1,71 +1,71 @@
Feature: Users
- In order to prevent users module regressions
- As a site owner
- I want to create, search and modify user accounts
+ In order to prevent users module regressions
+ As a site owner
+ I want to create, search and modify user accounts
@management
Scenario: There is only one user by default
Given I have installed Orchard
When I go to "admin/users"
- Then I should see "Manage Users"
- And I should see "]*>admin"
+ Then I should see "Manage Users"
+ And I should see "]*>admin"
@management
Scenario: I can create a new user
Given I have installed Orchard
When I go to "admin/users"
- Then I should see "Manage Users"
- When I follow "Add a new user"
- And I fill in
+ Then I should see "Manage Users"
+ When I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
+ And I am redirected
Then I should see "User created"
- When I follow "Add a new user"
- And I fill in
+ When I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user2@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
- | UserRoles.Roles[0].Granted | true |
+ | UserRoles.Roles[0].Granted | true |
And I hit "Save"
- And I am redirected
+ And I am redirected
Then I should see "User created"
- And I should see "Adding role Administrator to user user2"
- When I follow "Add a new user"
- And I fill in
+ And I should see "Adding role Administrator to user user2"
+ When I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user3 |
| Email | user3@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
- | UserRoles.Roles[0].Granted | true |
- | UserRoles.Roles[1].Granted | true |
- | UserRoles.Roles[2].Granted | true |
- | UserRoles.Roles[3].Granted | true |
- | UserRoles.Roles[4].Granted | true |
+ | UserRoles.Roles[0].Granted | true |
+ | UserRoles.Roles[1].Granted | true |
+ | UserRoles.Roles[2].Granted | true |
+ | UserRoles.Roles[3].Granted | true |
+ | UserRoles.Roles[4].Granted | true |
And I hit "Save"
- And I am redirected
+ And I am redirected
Then I should see "User created"
- And I should see "Adding role Administrator to user user3"
- And I should see "Adding role Editor to user user3"
- And I should see "Adding role Moderator to user user3"
- And I should see "Adding role Author to user user3"
- And I should see "Adding role Contributor to user user3"
- When I follow "Add a new user"
+ And I should see "Adding role Administrator to user user3"
+ And I should see "Adding role Editor to user user3"
+ And I should see "Adding role Moderator to user user3"
+ And I should see "Adding role Author to user user3"
+ And I should see "Adding role Contributor to user user3"
+ When I follow "Add a new user"
And I hit "Save"
Then I should see "The UserName field is required."
Then I should see "The Email field is required."
Then I should see "The Password field is required."
Then I should see "The ConfirmPassword field is required."
When I go to "admin/users"
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user4 |
| Email | user4@domain.com |
@@ -78,212 +78,238 @@ Scenario: I can create a new user
Scenario: I can edit an existing user
Given I have installed Orchard
When I go to "admin/users"
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
+ And I am redirected
Then I should see "User created"
- When I fill in
+ When I fill in
| name | value |
| Options.Search | user1 |
- And I hit "Filter"
- Then I should see "]*>user1"
- When I follow "Edit"
- And I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ When I follow "Edit"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user2@domain.com |
And I hit "Save"
- And I am redirected
+ And I am redirected
Then I should see "User information updated"
- And I should see "]*>user2"
- And I should see "user2@domain.com"
+ And I should see "]*>user2"
+ And I should see "user2@domain.com"
@management
Scenario: I should not be able to reuse an existing username or email
Given I have installed Orchard
When I go to "admin/users"
# create user1
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
+ And I am redirected
# create user2
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user2@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
- Then I should see "]*>user1"
- And I should see "]*>user2"
+ And I am redirected
+ Then I should see "]*>user1"
+ And I should see "]*>user2"
# filtering on 'user1' to have only one Edit link to follow
- When I fill in
+ When I fill in
| name | value |
| Options.Search | user1 |
- And I hit "Filter"
- Then I should see "]*>user1"
- When I follow "Edit"
- And I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ When I follow "Edit"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user1@domain.com |
And I hit "Save"
Then I should see "User with that username and/or email already exists."
- When I fill in
+ When I fill in
| name | value |
| UserName | user1 |
| Email | user2@domain.com |
And I hit "Save"
Then I should see "User with that username and/or email already exists."
+@management
+Scenario: I should be able to remove an existing user
+ Given I have installed Orchard
+ When I go to "admin/users"
+# create user1
+ And I follow "Add a new user"
+ And I fill in
+ | name | value |
+ | UserName | user1 |
+ | Email | user1@domain.com |
+ | Password | a12345! |
+ | ConfirmPassword | a12345! |
+ And I hit "Save"
+ And I am redirected
+ Then I should see "]*>user1"
+# filtering on 'user1' to have only one Delete link to follow
+ When I fill in
+ | name | value |
+ | Options.Search | user1 |
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ When I follow "Delete"
+ And I am redirected
+ Then I should see "User user1 deleted"
+ And I should not see "]*>user1"
+
@filtering
Scenario: I should not be able to filter users by name
Given I have installed Orchard
When I go to "admin/users"
# create user1
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
+ And I am redirected
# create user2
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user2@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
- Then I should see "]*>user1"
- And I should see "]*>user2"
- When I fill in
+ And I am redirected
+ Then I should see "]*>user1"
+ And I should see "]*>user2"
+ When I fill in
| name | value |
| Options.Search | user1 |
- And I hit "Filter"
- Then I should see "]*>user1"
- And I should not see "]*>admin"
- And I should not see "]*>user2"
- When I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ And I should not see "]*>admin"
+ And I should not see "]*>user2"
+ When I fill in
| name | value |
| Options.Search | user1@domain.com |
- And I hit "Filter"
- Then I should see "]*>user1"
- And I should not see "]*>admin"
- And I should not see "]*>user2"
- When I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ And I should not see "]*>admin"
+ And I should not see "]*>user2"
+ When I fill in
| name | value |
| Options.Search | @domain.com |
- And I hit "Filter"
- Then I should see "]*>user1"
- And I should see "]*>user2"
- And I should not see "]*>admin"
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ And I should see "]*>user2"
+ And I should not see "]*>admin"
@filtering
Scenario: I should be able to filter users by status
Given I have installed Orchard
When I go to "admin/users"
# create user1
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
+ And I am redirected
# create user2
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user2 |
| Email | user2@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
- Then I should see "]*>user1"
- And I should see "]*>user2"
- When I fill in
+ And I am redirected
+ Then I should see "]*>user1"
+ And I should see "]*>user2"
+ When I fill in
| name | value |
| Options.Search | user1 |
- And I hit "Filter"
- Then I should see "]*>user1"
- When I follow "Disable"
- And I am redirected
- Then I should see "User user1 disabled"
- When I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ When I follow "Disable"
+ And I am redirected
+ Then I should see "User user1 disabled"
+ When I fill in
| name | value |
| Options.Filter | Pending |
- And I hit "Filter"
- Then I should see "]*>user1"
- And I should not see "]*>user2"
- And I should not see "]*>admin"
- When I fill in
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ And I should not see "]*>user2"
+ And I should not see "]*>admin"
+ When I fill in
| name | value |
| Options.Filter | EmailPending |
- And I hit "Filter"
- Then I should not see "]*>user1"
- And I should not see "]*>user2"
- And I should not see "]*>admin"
- When I fill in
+ And I hit "Filter"
+ Then I should not see "]*>user1"
+ And I should not see "]*>user2"
+ And I should not see "]*>admin"
+ When I fill in
| name | value |
| Options.Filter | Approved |
- And I hit "Filter"
- Then I should not see "]*>user1"
- And I should see "]*>user2"
- And I should see "]*>admin"
- When I fill in
+ And I hit "Filter"
+ Then I should not see "]*>user1"
+ And I should see "]*>user2"
+ And I should see "]*>admin"
+ When I fill in
| name | value |
| Options.Filter | All |
- And I hit "Filter"
- Then I should see "]*>user1"
- And I should see "]*>user2"
- And I should see "]*>admin"
+ And I hit "Filter"
+ Then I should see "]*>user1"
+ And I should see "]*>user2"
+ And I should see "]*>admin"
@email
Scenario: I should not be able to add users with invalid email addresses
Given I have installed Orchard
When I go to "admin/users"
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | NotAnEmail |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- Then I should see "You must specify a valid email address."
+ Then I should see "You must specify a valid email address."
@email
Scenario: I should be able to add users with valid email addresses
Given I have installed Orchard
When I go to "admin/users"
- And I follow "Add a new user"
- And I fill in
+ And I follow "Add a new user"
+ And I fill in
| name | value |
| UserName | user1 |
| Email | user1@domain.com |
| Password | a12345! |
| ConfirmPassword | a12345! |
And I hit "Save"
- And I am redirected
- Then I should see "User created"
+ And I am redirected
+ Then I should see "User created"
diff --git a/src/Orchard.Specs/Users.feature.cs b/src/Orchard.Specs/Users.feature.cs
index 54579ba16..d6500e267 100644
--- a/src/Orchard.Specs/Users.feature.cs
+++ b/src/Orchard.Specs/Users.feature.cs
@@ -2,7 +2,7 @@
//
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.5.0.0
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -67,9 +67,9 @@ this.ScenarioSetup(scenarioInfo);
#line 9
testRunner.When("I go to \"admin/users\"");
#line 10
- testRunner.Then("I should see \"Manage Users\"");
+ testRunner.Then("I should see \"Manage Users\"");
#line 11
- testRunner.And("I should see \"]*>admin\"");
+ testRunner.And("I should see \"]*>admin\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -88,9 +88,9 @@ this.ScenarioSetup(scenarioInfo);
#line 16
testRunner.When("I go to \"admin/users\"");
#line 17
- testRunner.Then("I should see \"Manage Users\"");
+ testRunner.Then("I should see \"Manage Users\"");
#line 18
- testRunner.When("I follow \"Add a new user\"");
+ testRunner.When("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -108,15 +108,15 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a12345!"});
#line 19
- testRunner.And("I fill in", ((string)(null)), table1);
+ testRunner.And("I fill in", ((string)(null)), table1);
#line 25
testRunner.And("I hit \"Save\"");
#line 26
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 27
testRunner.Then("I should see \"User created\"");
#line 28
- testRunner.When("I follow \"Add a new user\"");
+ testRunner.When("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -137,17 +137,17 @@ this.ScenarioSetup(scenarioInfo);
"UserRoles.Roles[0].Granted",
"true"});
#line 29
- testRunner.And("I fill in", ((string)(null)), table2);
+ testRunner.And("I fill in", ((string)(null)), table2);
#line 36
testRunner.And("I hit \"Save\"");
#line 37
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 38
testRunner.Then("I should see \"User created\"");
#line 39
- testRunner.And("I should see \"Adding role Administrator to user user2\"");
+ testRunner.And("I should see \"Adding role Administrator to user user2\"");
#line 40
- testRunner.When("I follow \"Add a new user\"");
+ testRunner.When("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -180,25 +180,25 @@ this.ScenarioSetup(scenarioInfo);
"UserRoles.Roles[4].Granted",
"true"});
#line 41
- testRunner.And("I fill in", ((string)(null)), table3);
+ testRunner.And("I fill in", ((string)(null)), table3);
#line 52
testRunner.And("I hit \"Save\"");
#line 53
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 54
testRunner.Then("I should see \"User created\"");
#line 55
- testRunner.And("I should see \"Adding role Administrator to user user3\"");
+ testRunner.And("I should see \"Adding role Administrator to user user3\"");
#line 56
- testRunner.And("I should see \"Adding role Editor to user user3\"");
+ testRunner.And("I should see \"Adding role Editor to user user3\"");
#line 57
- testRunner.And("I should see \"Adding role Moderator to user user3\"");
+ testRunner.And("I should see \"Adding role Moderator to user user3\"");
#line 58
- testRunner.And("I should see \"Adding role Author to user user3\"");
+ testRunner.And("I should see \"Adding role Author to user user3\"");
#line 59
- testRunner.And("I should see \"Adding role Contributor to user user3\"");
+ testRunner.And("I should see \"Adding role Contributor to user user3\"");
#line 60
- testRunner.When("I follow \"Add a new user\"");
+ testRunner.When("I follow \"Add a new user\"");
#line 61
testRunner.And("I hit \"Save\"");
#line 62
@@ -212,7 +212,7 @@ this.ScenarioSetup(scenarioInfo);
#line 66
testRunner.When("I go to \"admin/users\"");
#line 67
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -230,7 +230,7 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a123456!"});
#line 68
- testRunner.And("I fill in", ((string)(null)), table4);
+ testRunner.And("I fill in", ((string)(null)), table4);
#line 74
testRunner.And("I hit \"Save\"");
#line 75
@@ -253,7 +253,7 @@ this.ScenarioSetup(scenarioInfo);
#line 80
testRunner.When("I go to \"admin/users\"");
#line 81
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -271,11 +271,11 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a12345!"});
#line 82
- testRunner.And("I fill in", ((string)(null)), table5);
+ testRunner.And("I fill in", ((string)(null)), table5);
#line 88
testRunner.And("I hit \"Save\"");
#line 89
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 90
testRunner.Then("I should see \"User created\"");
#line hidden
@@ -286,13 +286,13 @@ this.ScenarioSetup(scenarioInfo);
"Options.Search",
"user1"});
#line 91
- testRunner.When("I fill in", ((string)(null)), table6);
+ testRunner.When("I fill in", ((string)(null)), table6);
#line 94
- testRunner.And("I hit \"Filter\"");
+ testRunner.And("I hit \"Filter\"");
#line 95
- testRunner.Then("I should see \"]*>user1\"");
+ testRunner.Then("I should see \"]*>user1\"");
#line 96
- testRunner.When("I follow \"Edit\"");
+ testRunner.When("I follow \"Edit\"");
#line hidden
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -304,17 +304,17 @@ this.ScenarioSetup(scenarioInfo);
"Email",
"user2@domain.com"});
#line 97
- testRunner.And("I fill in", ((string)(null)), table7);
+ testRunner.And("I fill in", ((string)(null)), table7);
#line 101
testRunner.And("I hit \"Save\"");
#line 102
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 103
testRunner.Then("I should see \"User information updated\"");
#line 104
- testRunner.And("I should see \"]*>user2\"");
+ testRunner.And("I should see \"]*>user2\"");
#line 105
- testRunner.And("I should see \"user2@domain.com\"");
+ testRunner.And("I should see \"user2@domain.com\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -333,7 +333,7 @@ this.ScenarioSetup(scenarioInfo);
#line 110
testRunner.When("I go to \"admin/users\"");
#line 112
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -351,13 +351,13 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a12345!"});
#line 113
- testRunner.And("I fill in", ((string)(null)), table8);
+ testRunner.And("I fill in", ((string)(null)), table8);
#line 119
testRunner.And("I hit \"Save\"");
#line 120
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 122
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -375,15 +375,15 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a12345!"});
#line 123
- testRunner.And("I fill in", ((string)(null)), table9);
+ testRunner.And("I fill in", ((string)(null)), table9);
#line 129
testRunner.And("I hit \"Save\"");
#line 130
- testRunner.And("I am redirected");
+ testRunner.And("I am redirected");
#line 131
- testRunner.Then("I should see \"]*>user1\"");
+ testRunner.Then("I should see \"]*>user1\"");
#line 132
- testRunner.And("I should see \"]*>user2\"");
+ testRunner.And("I should see \"]*>user2\"");
#line hidden
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -392,13 +392,13 @@ this.ScenarioSetup(scenarioInfo);
"Options.Search",
"user1"});
#line 134
- testRunner.When("I fill in", ((string)(null)), table10);
+ testRunner.When("I fill in", ((string)(null)), table10);
#line 137
- testRunner.And("I hit \"Filter\"");
+ testRunner.And("I hit \"Filter\"");
#line 138
- testRunner.Then("I should see \"]*>user1\"");
+ testRunner.Then("I should see \"]*>user1\"");
#line 139
- testRunner.When("I follow \"Edit\"");
+ testRunner.When("I follow \"Edit\"");
#line hidden
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -410,7 +410,7 @@ this.ScenarioSetup(scenarioInfo);
"Email",
"user1@domain.com"});
#line 140
- testRunner.And("I fill in", ((string)(null)), table11);
+ testRunner.And("I fill in", ((string)(null)), table11);
#line 144
testRunner.And("I hit \"Save\"");
#line 145
@@ -426,7 +426,7 @@ this.ScenarioSetup(scenarioInfo);
"Email",
"user2@domain.com"});
#line 146
- testRunner.When("I fill in", ((string)(null)), table12);
+ testRunner.When("I fill in", ((string)(null)), table12);
#line 150
testRunner.And("I hit \"Save\"");
#line 151
@@ -436,12 +436,12 @@ this.ScenarioSetup(scenarioInfo);
}
[NUnit.Framework.TestAttribute()]
- [NUnit.Framework.DescriptionAttribute("I should not be able to filter users by name")]
- [NUnit.Framework.CategoryAttribute("filtering")]
- public virtual void IShouldNotBeAbleToFilterUsersByName()
+ [NUnit.Framework.DescriptionAttribute("I should be able to remove an existing user")]
+ [NUnit.Framework.CategoryAttribute("management")]
+ public virtual void IShouldBeAbleToRemoveAnExistingUser()
{
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should not be able to filter users by name", new string[] {
- "filtering"});
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should be able to remove an existing user", new string[] {
+ "management"});
#line 154
this.ScenarioSetup(scenarioInfo);
#line 155
@@ -449,7 +449,7 @@ this.ScenarioSetup(scenarioInfo);
#line 156
testRunner.When("I go to \"admin/users\"");
#line 158
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -467,90 +467,154 @@ this.ScenarioSetup(scenarioInfo);
"ConfirmPassword",
"a12345!"});
#line 159
- testRunner.And("I fill in", ((string)(null)), table13);
+ testRunner.And("I fill in", ((string)(null)), table13);
#line 165
testRunner.And("I hit \"Save\"");
#line 166
- testRunner.And("I am redirected");
-#line 168
- testRunner.And("I follow \"Add a new user\"");
+ testRunner.And("I am redirected");
+#line 167
+ testRunner.Then("I should see \"]*>user1\"");
#line hidden
TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table14.AddRow(new string[] {
- "UserName",
- "user2"});
- table14.AddRow(new string[] {
- "Email",
- "user2@domain.com"});
- table14.AddRow(new string[] {
- "Password",
- "a12345!"});
- table14.AddRow(new string[] {
- "ConfirmPassword",
- "a12345!"});
+ "Options.Search",
+ "user1"});
#line 169
- testRunner.And("I fill in", ((string)(null)), table14);
+ testRunner.When("I fill in", ((string)(null)), table14);
+#line 172
+ testRunner.And("I hit \"Filter\"");
+#line 173
+ testRunner.Then("I should see \"]*>user1\"");
+#line 174
+ testRunner.When("I follow \"Delete\"");
#line 175
- testRunner.And("I hit \"Save\"");
+ testRunner.And("I am redirected");
#line 176
- testRunner.And("I am redirected");
+ testRunner.Then("I should see \"User user1 deleted\"");
#line 177
- testRunner.Then("I should see \"]*>user1\"");
-#line 178
- testRunner.And("I should see \"]*>user2\"");
+ testRunner.And("I should not see \"]*>user1\"");
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("I should not be able to filter users by name")]
+ [NUnit.Framework.CategoryAttribute("filtering")]
+ public virtual void IShouldNotBeAbleToFilterUsersByName()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should not be able to filter users by name", new string[] {
+ "filtering"});
+#line 180
+this.ScenarioSetup(scenarioInfo);
+#line 181
+ testRunner.Given("I have installed Orchard");
+#line 182
+ testRunner.When("I go to \"admin/users\"");
+#line 184
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table15.AddRow(new string[] {
- "Options.Search",
+ "UserName",
"user1"});
-#line 179
- testRunner.When("I fill in", ((string)(null)), table15);
-#line 182
- testRunner.And("I hit \"Filter\"");
-#line 183
- testRunner.Then("I should see \"]*>user1\"");
-#line 184
- testRunner.And("I should not see \"]*>admin\"");
+ table15.AddRow(new string[] {
+ "Email",
+ "user1@domain.com"});
+ table15.AddRow(new string[] {
+ "Password",
+ "a12345!"});
+ table15.AddRow(new string[] {
+ "ConfirmPassword",
+ "a12345!"});
#line 185
- testRunner.And("I should not see \"]*>user2\"");
+ testRunner.And("I fill in", ((string)(null)), table15);
+#line 191
+ testRunner.And("I hit \"Save\"");
+#line 192
+ testRunner.And("I am redirected");
+#line 194
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table16.AddRow(new string[] {
- "Options.Search",
- "user1@domain.com"});
-#line 186
- testRunner.When("I fill in", ((string)(null)), table16);
-#line 189
- testRunner.And("I hit \"Filter\"");
-#line 190
- testRunner.Then("I should see \"]*>user1\"");
-#line 191
- testRunner.And("I should not see \"]*>admin\"");
-#line 192
- testRunner.And("I should not see \"]*>user2\"");
+ "UserName",
+ "user2"});
+ table16.AddRow(new string[] {
+ "Email",
+ "user2@domain.com"});
+ table16.AddRow(new string[] {
+ "Password",
+ "a12345!"});
+ table16.AddRow(new string[] {
+ "ConfirmPassword",
+ "a12345!"});
+#line 195
+ testRunner.And("I fill in", ((string)(null)), table16);
+#line 201
+ testRunner.And("I hit \"Save\"");
+#line 202
+ testRunner.And("I am redirected");
+#line 203
+ testRunner.Then("I should see \"]*>user1\"");
+#line 204
+ testRunner.And("I should see \"]*>user2\"");
#line hidden
TechTalk.SpecFlow.Table table17 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table17.AddRow(new string[] {
+ "Options.Search",
+ "user1"});
+#line 205
+ testRunner.When("I fill in", ((string)(null)), table17);
+#line 208
+ testRunner.And("I hit \"Filter\"");
+#line 209
+ testRunner.Then("I should see \"]*>user1\"");
+#line 210
+ testRunner.And("I should not see \"]*>admin\"");
+#line 211
+ testRunner.And("I should not see \"]*>user2\"");
+#line hidden
+ TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table18.AddRow(new string[] {
+ "Options.Search",
+ "user1@domain.com"});
+#line 212
+ testRunner.When("I fill in", ((string)(null)), table18);
+#line 215
+ testRunner.And("I hit \"Filter\"");
+#line 216
+ testRunner.Then("I should see \"]*>user1\"");
+#line 217
+ testRunner.And("I should not see \"]*>admin\"");
+#line 218
+ testRunner.And("I should not see \"]*>user2\"");
+#line hidden
+ TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table19.AddRow(new string[] {
"Options.Search",
"@domain.com"});
-#line 193
- testRunner.When("I fill in", ((string)(null)), table17);
-#line 196
- testRunner.And("I hit \"Filter\"");
-#line 197
- testRunner.Then("I should see \"]*>user1\"");
-#line 198
- testRunner.And("I should see \"]*>user2\"");
-#line 199
- testRunner.And("I should not see \"]*>admin\"");
+#line 219
+ testRunner.When("I fill in", ((string)(null)), table19);
+#line 222
+ testRunner.And("I hit \"Filter\"");
+#line 223
+ testRunner.Then("I should see \"]*>user1\"");
+#line 224
+ testRunner.And("I should see \"]*>user2\"");
+#line 225
+ testRunner.And("I should not see \"]*>admin\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -562,151 +626,151 @@ this.ScenarioSetup(scenarioInfo);
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should be able to filter users by status", new string[] {
"filtering"});
-#line 202
+#line 228
this.ScenarioSetup(scenarioInfo);
-#line 203
+#line 229
testRunner.Given("I have installed Orchard");
-#line 204
+#line 230
testRunner.When("I go to \"admin/users\"");
-#line 206
- testRunner.And("I follow \"Add a new user\"");
-#line hidden
- TechTalk.SpecFlow.Table table18 = new TechTalk.SpecFlow.Table(new string[] {
- "name",
- "value"});
- table18.AddRow(new string[] {
- "UserName",
- "user1"});
- table18.AddRow(new string[] {
- "Email",
- "user1@domain.com"});
- table18.AddRow(new string[] {
- "Password",
- "a12345!"});
- table18.AddRow(new string[] {
- "ConfirmPassword",
- "a12345!"});
-#line 207
- testRunner.And("I fill in", ((string)(null)), table18);
-#line 213
- testRunner.And("I hit \"Save\"");
-#line 214
- testRunner.And("I am redirected");
-#line 216
- testRunner.And("I follow \"Add a new user\"");
-#line hidden
- TechTalk.SpecFlow.Table table19 = new TechTalk.SpecFlow.Table(new string[] {
- "name",
- "value"});
- table19.AddRow(new string[] {
- "UserName",
- "user2"});
- table19.AddRow(new string[] {
- "Email",
- "user2@domain.com"});
- table19.AddRow(new string[] {
- "Password",
- "a12345!"});
- table19.AddRow(new string[] {
- "ConfirmPassword",
- "a12345!"});
-#line 217
- testRunner.And("I fill in", ((string)(null)), table19);
-#line 223
- testRunner.And("I hit \"Save\"");
-#line 224
- testRunner.And("I am redirected");
-#line 225
- testRunner.Then("I should see \"]*>user1\"");
-#line 226
- testRunner.And("I should see \"]*>user2\"");
+#line 232
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table20 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table20.AddRow(new string[] {
- "Options.Search",
+ "UserName",
"user1"});
-#line 227
- testRunner.When("I fill in", ((string)(null)), table20);
-#line 230
- testRunner.And("I hit \"Filter\"");
-#line 231
- testRunner.Then("I should see \"]*>user1\"");
-#line 232
- testRunner.When("I follow \"Disable\"");
+ table20.AddRow(new string[] {
+ "Email",
+ "user1@domain.com"});
+ table20.AddRow(new string[] {
+ "Password",
+ "a12345!"});
+ table20.AddRow(new string[] {
+ "ConfirmPassword",
+ "a12345!"});
#line 233
- testRunner.And("I am redirected");
-#line 234
- testRunner.Then("I should see \"User user1 disabled\"");
+ testRunner.And("I fill in", ((string)(null)), table20);
+#line 239
+ testRunner.And("I hit \"Save\"");
+#line 240
+ testRunner.And("I am redirected");
+#line 242
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
TechTalk.SpecFlow.Table table21 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table21.AddRow(new string[] {
- "Options.Filter",
- "Pending"});
-#line 235
- testRunner.When("I fill in", ((string)(null)), table21);
-#line 238
- testRunner.And("I hit \"Filter\"");
-#line 239
- testRunner.Then("I should see \"]*>user1\"");
-#line 240
- testRunner.And("I should not see \"]*>user2\"");
-#line 241
- testRunner.And("I should not see \"]*>admin\"");
+ "UserName",
+ "user2"});
+ table21.AddRow(new string[] {
+ "Email",
+ "user2@domain.com"});
+ table21.AddRow(new string[] {
+ "Password",
+ "a12345!"});
+ table21.AddRow(new string[] {
+ "ConfirmPassword",
+ "a12345!"});
+#line 243
+ testRunner.And("I fill in", ((string)(null)), table21);
+#line 249
+ testRunner.And("I hit \"Save\"");
+#line 250
+ testRunner.And("I am redirected");
+#line 251
+ testRunner.Then("I should see \"]*>user1\"");
+#line 252
+ testRunner.And("I should see \"]*>user2\"");
#line hidden
TechTalk.SpecFlow.Table table22 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table22.AddRow(new string[] {
- "Options.Filter",
- "EmailPending"});
-#line 242
- testRunner.When("I fill in", ((string)(null)), table22);
-#line 245
- testRunner.And("I hit \"Filter\"");
-#line 246
- testRunner.Then("I should not see \"]*>user1\"");
-#line 247
- testRunner.And("I should not see \"]*>user2\"");
-#line 248
- testRunner.And("I should not see \"]*>admin\"");
+ "Options.Search",
+ "user1"});
+#line 253
+ testRunner.When("I fill in", ((string)(null)), table22);
+#line 256
+ testRunner.And("I hit \"Filter\"");
+#line 257
+ testRunner.Then("I should see \"]*>user1\"");
+#line 258
+ testRunner.When("I follow \"Disable\"");
+#line 259
+ testRunner.And("I am redirected");
+#line 260
+ testRunner.Then("I should see \"User user1 disabled\"");
#line hidden
TechTalk.SpecFlow.Table table23 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table23.AddRow(new string[] {
"Options.Filter",
- "Approved"});
-#line 249
- testRunner.When("I fill in", ((string)(null)), table23);
-#line 252
- testRunner.And("I hit \"Filter\"");
-#line 253
- testRunner.Then("I should not see \"]*>user1\"");
-#line 254
- testRunner.And("I should see \"]*>user2\"");
-#line 255
- testRunner.And("I should see \"]*>admin\"");
+ "Pending"});
+#line 261
+ testRunner.When("I fill in", ((string)(null)), table23);
+#line 264
+ testRunner.And("I hit \"Filter\"");
+#line 265
+ testRunner.Then("I should see \"]*>user1\"");
+#line 266
+ testRunner.And("I should not see \"]*>user2\"");
+#line 267
+ testRunner.And("I should not see \"]*>admin\"");
#line hidden
TechTalk.SpecFlow.Table table24 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table24.AddRow(new string[] {
+ "Options.Filter",
+ "EmailPending"});
+#line 268
+ testRunner.When("I fill in", ((string)(null)), table24);
+#line 271
+ testRunner.And("I hit \"Filter\"");
+#line 272
+ testRunner.Then("I should not see \"]*>user1\"");
+#line 273
+ testRunner.And("I should not see \"]*>user2\"");
+#line 274
+ testRunner.And("I should not see \"]*>admin\"");
+#line hidden
+ TechTalk.SpecFlow.Table table25 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table25.AddRow(new string[] {
+ "Options.Filter",
+ "Approved"});
+#line 275
+ testRunner.When("I fill in", ((string)(null)), table25);
+#line 278
+ testRunner.And("I hit \"Filter\"");
+#line 279
+ testRunner.Then("I should not see \"]*>user1\"");
+#line 280
+ testRunner.And("I should see \"]*>user2\"");
+#line 281
+ testRunner.And("I should see \"]*>admin\"");
+#line hidden
+ TechTalk.SpecFlow.Table table26 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table26.AddRow(new string[] {
"Options.Filter",
"All"});
-#line 256
- testRunner.When("I fill in", ((string)(null)), table24);
-#line 259
- testRunner.And("I hit \"Filter\"");
-#line 260
- testRunner.Then("I should see \"]*>user1\"");
-#line 261
- testRunner.And("I should see \"]*>user2\"");
-#line 262
- testRunner.And("I should see \"]*>admin\"");
+#line 282
+ testRunner.When("I fill in", ((string)(null)), table26);
+#line 285
+ testRunner.And("I hit \"Filter\"");
+#line 286
+ testRunner.Then("I should see \"]*>user1\"");
+#line 287
+ testRunner.And("I should see \"]*>user2\"");
+#line 288
+ testRunner.And("I should see \"]*>admin\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -718,36 +782,36 @@ this.ScenarioSetup(scenarioInfo);
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should not be able to add users with invalid email addresses", new string[] {
"email"});
-#line 264
+#line 290
this.ScenarioSetup(scenarioInfo);
-#line 265
+#line 291
testRunner.Given("I have installed Orchard");
-#line 266
+#line 292
testRunner.When("I go to \"admin/users\"");
-#line 267
- testRunner.And("I follow \"Add a new user\"");
+#line 293
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
- TechTalk.SpecFlow.Table table25 = new TechTalk.SpecFlow.Table(new string[] {
+ TechTalk.SpecFlow.Table table27 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
- table25.AddRow(new string[] {
+ table27.AddRow(new string[] {
"UserName",
"user1"});
- table25.AddRow(new string[] {
+ table27.AddRow(new string[] {
"Email",
"NotAnEmail"});
- table25.AddRow(new string[] {
+ table27.AddRow(new string[] {
"Password",
"a12345!"});
- table25.AddRow(new string[] {
+ table27.AddRow(new string[] {
"ConfirmPassword",
"a12345!"});
-#line 268
- testRunner.And("I fill in", ((string)(null)), table25);
-#line 274
+#line 294
+ testRunner.And("I fill in", ((string)(null)), table27);
+#line 300
testRunner.And("I hit \"Save\"");
-#line 275
- testRunner.Then("I should see \"You must specify a valid email address.\"");
+#line 301
+ testRunner.Then("I should see \"You must specify a valid email address.\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -759,38 +823,38 @@ this.ScenarioSetup(scenarioInfo);
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I should be able to add users with valid email addresses", new string[] {
"email"});
-#line 277
+#line 303
this.ScenarioSetup(scenarioInfo);
-#line 278
+#line 304
testRunner.Given("I have installed Orchard");
-#line 279
+#line 305
testRunner.When("I go to \"admin/users\"");
-#line 280
- testRunner.And("I follow \"Add a new user\"");
+#line 306
+ testRunner.And("I follow \"Add a new user\"");
#line hidden
- TechTalk.SpecFlow.Table table26 = new TechTalk.SpecFlow.Table(new string[] {
+ TechTalk.SpecFlow.Table table28 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
- table26.AddRow(new string[] {
+ table28.AddRow(new string[] {
"UserName",
"user1"});
- table26.AddRow(new string[] {
+ table28.AddRow(new string[] {
"Email",
"user1@domain.com"});
- table26.AddRow(new string[] {
+ table28.AddRow(new string[] {
"Password",
"a12345!"});
- table26.AddRow(new string[] {
+ table28.AddRow(new string[] {
"ConfirmPassword",
"a12345!"});
-#line 281
- testRunner.And("I fill in", ((string)(null)), table26);
-#line 287
+#line 307
+ testRunner.And("I fill in", ((string)(null)), table28);
+#line 313
testRunner.And("I hit \"Save\"");
-#line 288
- testRunner.And("I am redirected");
-#line 289
- testRunner.Then("I should see \"User created\"");
+#line 314
+ testRunner.And("I am redirected");
+#line 315
+ testRunner.Then("I should see \"User created\"");
#line hidden
testRunner.CollectScenarioErrors();
}
diff --git a/src/Orchard.Web/Core/Routable/Drivers/RoutePartDriver.cs b/src/Orchard.Web/Core/Routable/Drivers/RoutePartDriver.cs
index 5fbf34f1f..5eab3cd3e 100644
--- a/src/Orchard.Web/Core/Routable/Drivers/RoutePartDriver.cs
+++ b/src/Orchard.Web/Core/Routable/Drivers/RoutePartDriver.cs
@@ -110,12 +110,23 @@ namespace Orchard.Core.Routable.Drivers {
if (path != null) {
part.Path = path;
}
+
+ var promoteToHomePage = context.Attribute(part.PartDefinition.Name, "PromoteToHomePage");
+ if (promoteToHomePage != null) {
+ part.PromoteToHomePage = Convert.ToBoolean(promoteToHomePage);
+ if (part.PromoteToHomePage && _routableHomePageProvider != null) {
+ _services.WorkContext.CurrentSite.HomePage = _routableHomePageProvider.GetSettingValue(part.ContentItem.Id);
+ }
+ }
}
protected override void Exporting(RoutePart part, ExportContentContext context) {
context.Element(part.PartDefinition.Name).SetAttributeValue("Title", part.Title);
context.Element(part.PartDefinition.Name).SetAttributeValue("Slug", part.Slug);
context.Element(part.PartDefinition.Name).SetAttributeValue("Path", part.Path);
+ if (_services.WorkContext.CurrentSite.HomePage == _routableHomePageProvider.GetSettingValue(part.ContentItem.Id)) {
+ context.Element(part.PartDefinition.Name).SetAttributeValue("PromoteToHomePage", "true");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css b/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
index ada0b7484..f16562be5 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
@@ -30,9 +30,10 @@
#shape-tracing-container input[type="button"],
#shape-tracing-container button,
#shape-tracing-container .button {
+ color:rgba(0, 94, 153, 0.8);
padding:0;
margin:0;
- border:1px solid rgba(182, 188, 189, 1.0);
+ border:1px solid rgba(154, 155, 157, 1.0);
background:rgba(236, 241, 242, 1.0);
/*CSS3 properties*/
@@ -90,7 +91,7 @@ button.create-template, button.create-template:hover, background-image:hover {
}
#shape-tracing-container .shape-tracing-meta-content {
- padding:0 0 30px 0;
+ padding:8px 0 30px 0;
overflow:auto;
}
@@ -193,8 +194,7 @@ button.create-template, button.create-template:hover, background-image:hover {
list-style-type:none;
}
-#shape-tracing-window-tree li > div {
-}
+#shape-tracing-window-tree li > div {}
#shape-tracing-window-content {
padding:0 0 0 6px;
@@ -299,7 +299,7 @@ button.create-template, button.create-template:hover, background-image:hover {
}
#shape-tracing-window-content .shape-tracing-tabs li.selected {
background-color:rgba(255, 255, 255, 0.9);
- color:rgba(102, 102, 102, 1.0);
+ color:rgba(51, 51, 51, 1.0);
border:1px solid rgba(102, 102, 102, 1.0);
}
#shape-tracing-window-content .grid-display {
diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs
index 11c1227fc..b83896b2e 100644
--- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs
+++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs
@@ -143,7 +143,7 @@ namespace Orchard.Users.Controllers {
break;
}
- return Index(viewModel.Options, new PagerParameters());
+ return RedirectToAction("Index", ControllerContext.RouteData.Values);
}
public ActionResult Create() {
diff --git a/src/Orchard.Web/Modules/TinyMce/ResourceManifest.cs b/src/Orchard.Web/Modules/TinyMce/ResourceManifest.cs
index 49bcbbbbe..43fbfd8b4 100644
--- a/src/Orchard.Web/Modules/TinyMce/ResourceManifest.cs
+++ b/src/Orchard.Web/Modules/TinyMce/ResourceManifest.cs
@@ -3,7 +3,9 @@ using Orchard.UI.Resources;
namespace TinyMce {
public class ResourceManifest : IResourceManifestProvider {
public void BuildManifests(ResourceManifestBuilder builder) {
- builder.Add().DefineScript("TinyMce").SetUrl("tiny_mce.js", "tiny_mce_src.js");
+ var manifest = builder.Add();
+ manifest.DefineScript("TinyMce").SetUrl("tiny_mce.js", "tiny_mce_src.js");
+ manifest.DefineScript("OrchardTinyMce").SetUrl("orchard-tinymce.js").SetDependencies("TinyMce");
}
}
}
diff --git a/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js b/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js
new file mode 100644
index 000000000..c4d2c3762
--- /dev/null
+++ b/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js
@@ -0,0 +1,13 @@
+tinyMCE.init({
+ theme: "advanced",
+ mode: "specific_textareas",
+ editor_selector: "tinymce",
+ plugins: "fullscreen,autoresize,searchreplace,mediapicker",
+ theme_advanced_toolbar_location: "top",
+ theme_advanced_toolbar_align: "left",
+ theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,mediapicker,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
+ theme_advanced_buttons2: "",
+ theme_advanced_buttons3: "",
+ convert_urls: false,
+ valid_elements: "*[*]"
+});
diff --git a/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/mediapicker/editor_plugin_src.js b/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/mediapicker/editor_plugin_src.js
index ee375f6fc..2db7e41b3 100644
--- a/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/mediapicker/editor_plugin_src.js
+++ b/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/mediapicker/editor_plugin_src.js
@@ -39,7 +39,7 @@
}
jQuery("#" + ed.id).trigger("orchard-admin-pickimage-open", {
img: editImage,
- uploadMediaPath: ed.getParam("mediapicker_uploadpath"),
+ uploadMediaPath: jQuery("#" + ed.id).data("mediapicker-uploadpath"), //ed.getParam("mediapicker_uploadpath"),
callback: function (data) {
ed.focus();
ed.selection.setContent(data.img.html);
@@ -49,7 +49,7 @@
// Register media button
ed.addButton('mediapicker', {
- title: ed.getParam("mediapicker_title"),
+ title: jQuery("#" + ed.id).data("mediapicker-title"), //ed.getParam("mediapicker_title"),
cmd: 'mceMediaPicker',
image: url + '/img/picture_add.png'
});
diff --git a/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj b/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj
index 4e79433f8..b61d94c07 100644
--- a/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj
+++ b/src/Orchard.Web/Modules/TinyMce/TinyMce.csproj
@@ -50,6 +50,7 @@
+
diff --git a/src/Orchard.Web/Modules/TinyMce/Views/Body-Html.Editor.cshtml b/src/Orchard.Web/Modules/TinyMce/Views/Body-Html.Editor.cshtml
index b40ae662d..ae225fce5 100644
--- a/src/Orchard.Web/Modules/TinyMce/Views/Body-Html.Editor.cshtml
+++ b/src/Orchard.Web/Modules/TinyMce/Views/Body-Html.Editor.cshtml
@@ -1,28 +1,9 @@
@{
- Script.Require("TinyMce");
+ Script.Require("OrchardTinyMce");
}
-@using(Script.Foot()) {
-
-}
-@Html.TextArea("Text", (string)Model.Text, 25, 80, new { @class = "html" })
+@Html.TextArea("Text", (string)Model.Text, 25, 80,
+ new Dictionary {
+ {"class", "html tinymce"},
+ {"data-mediapicker-uploadpath",Model.AddMediaPath},
+ {"data-mediapicker-title",T("Insert/Update Media")}
+ })
diff --git a/src/Orchard.Web/Themes/TheThemeMachine/ThemeZonePreview.png b/src/Orchard.Web/Themes/TheThemeMachine/ThemeZonePreview.png
index a71d60878..d379f3c2e 100644
Binary files a/src/Orchard.Web/Themes/TheThemeMachine/ThemeZonePreview.png and b/src/Orchard.Web/Themes/TheThemeMachine/ThemeZonePreview.png differ