mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding multiple content item selection in ContentPickerField
--HG-- branch : 1.x
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
fdaecfbb0eab3673a3074313f5adcedc6a678506 src/Orchard.Web/Modules/Orchard.AntiSpam
|
fdaecfbb0eab3673a3074313f5adcedc6a678506 src/Orchard.Web/Modules/Orchard.AntiSpam
|
||||||
bf20391f8fe1ba5d67cadc0643d79ad9fe892d4e src/Orchard.Web/Modules/Orchard.Autoroute
|
bf20391f8fe1ba5d67cadc0643d79ad9fe892d4e src/Orchard.Web/Modules/Orchard.Autoroute
|
||||||
da175731d643b675472e893689641066db827a7c src/Orchard.Web/Modules/Orchard.ContentPicker
|
5457a8b7a343395b7dc874cd418f81f267358d55 src/Orchard.Web/Modules/Orchard.ContentPicker
|
||||||
37b71cc2949b792b8da48ee4b5450684e3f8b4cf src/Orchard.Web/Modules/Orchard.CustomForms
|
37b71cc2949b792b8da48ee4b5450684e3f8b4cf src/Orchard.Web/Modules/Orchard.CustomForms
|
||||||
b8e23b1daab66d46b6d2196f87aceb91aed2f582 src/Orchard.Web/Modules/Orchard.Forms
|
b8e23b1daab66d46b6d2196f87aceb91aed2f582 src/Orchard.Web/Modules/Orchard.Forms
|
||||||
cfc264d41c1d299c104d76c5032d8ffee3047dcd src/Orchard.Web/Modules/Orchard.Rules
|
cfc264d41c1d299c104d76c5032d8ffee3047dcd src/Orchard.Web/Modules/Orchard.Rules
|
||||||
@@ -9,4 +9,4 @@ cfc264d41c1d299c104d76c5032d8ffee3047dcd src/Orchard.Web/Modules/Orchard.Rules
|
|||||||
f6fecd1702066225a84a482ac029e3e6daff38f3 src/Orchard.Web/Modules/Orchard.ViewPermissions
|
f6fecd1702066225a84a482ac029e3e6daff38f3 src/Orchard.Web/Modules/Orchard.ViewPermissions
|
||||||
4ed51e0e76c2aacc2de90ce9984fd00cfdfae2ce src/orchard.web/Modules/Orchard.Alias
|
4ed51e0e76c2aacc2de90ce9984fd00cfdfae2ce src/orchard.web/Modules/Orchard.Alias
|
||||||
29857523c5275b8566ee3a6f4ba2a3d641e7fa0c src/orchard.web/Modules/Orchard.Projections
|
29857523c5275b8566ee3a6f4ba2a3d641e7fa0c src/orchard.web/Modules/Orchard.Projections
|
||||||
dd54e3ffe5199d162cad97772ce40dccaf613c3f src/orchard.web/modules/Orchard.Fields
|
e8d6ad7df228083093e57d5b5d489a949bd68cfb src/orchard.web/modules/Orchard.Fields
|
||||||
|
@@ -1 +1 @@
|
|||||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Reports,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.jQuery,Orchard.Lists,Orchard.Media,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Reports,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.jQuery,Orchard.Lists,Orchard.Media,Orchard.ContentPicker,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
||||||
|
@@ -23,7 +23,7 @@ namespace Orchard.Specs.Bindings {
|
|||||||
webApp.GivenIHaveACleanSiteWith(
|
webApp.GivenIHaveACleanSiteWith(
|
||||||
virtualDirectory,
|
virtualDirectory,
|
||||||
TableData(
|
TableData(
|
||||||
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields" },
|
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.ContentPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields" },
|
||||||
new { extension = "Core", names = "Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title" },
|
new { extension = "Core", names = "Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title" },
|
||||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ Scenario: Some of the initial form values are required
|
|||||||
Scenario: Calling setup on a brand new install
|
Scenario: Calling setup on a brand new install
|
||||||
Given I have a clean site with
|
Given I have a clean site with
|
||||||
| extension | names |
|
| extension | names |
|
||||||
| Module | Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields |
|
| Module | Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.ContentPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields |
|
||||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||||
| Theme | SafeMode, TheAdmin, TheThemeMachine |
|
| Theme | SafeMode, TheAdmin, TheThemeMachine |
|
||||||
And I am on "/Setup"
|
And I am on "/Setup"
|
||||||
|
4
src/Orchard.Specs/Setup.feature.cs
generated
4
src/Orchard.Specs/Setup.feature.cs
generated
@@ -3,7 +3,7 @@
|
|||||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||||
// SpecFlow Version:1.8.1.0
|
// SpecFlow Version:1.8.1.0
|
||||||
// SpecFlow Generator Version:1.8.0.0
|
// SpecFlow Generator Version:1.8.0.0
|
||||||
// Runtime Version:4.0.30319.239
|
// Runtime Version:4.0.30319.269
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -188,7 +188,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
"names"});
|
"names"});
|
||||||
table4.AddRow(new string[] {
|
table4.AddRow(new string[] {
|
||||||
"Module",
|
"Module",
|
||||||
@"Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields"});
|
@"Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.ContentPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields"});
|
||||||
table4.AddRow(new string[] {
|
table4.AddRow(new string[] {
|
||||||
"Core",
|
"Core",
|
||||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||||
|
@@ -19,17 +19,14 @@
|
|||||||
jQuery('#btn-@Html.FieldIdFor(m => m.ContentItemId)').trigger("orchard-admin-contentpicker-open", {
|
jQuery('#btn-@Html.FieldIdFor(m => m.ContentItemId)').trigger("orchard-admin-contentpicker-open", {
|
||||||
callback: function(data) {
|
callback: function(data) {
|
||||||
|
|
||||||
var id = data.id;
|
jQuery('#@Html.FieldIdFor(m => m.ContentItemId)').val(data.id);
|
||||||
jQuery('#@Html.FieldIdFor(m => m.ContentItemId)').val(id);
|
|
||||||
|
|
||||||
var title = data.title;
|
jQuery('#title-@Html.FieldIdFor(m => m.ContentItemId)').text(data.displayText);
|
||||||
if (title && title.length > 0) {
|
|
||||||
jQuery('#title-@Html.FieldIdFor(m => m.ContentItemId)').text(title);
|
|
||||||
|
|
||||||
var menuText = jQuery('#MenuText');
|
// define the menu text if it's empty
|
||||||
if (menuText.length > 0) {
|
var menuText = jQuery('#MenuText');
|
||||||
menuText.val(title);
|
if (menuText.val().length == 0) {
|
||||||
}
|
menuText.val(data.displayText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
</Recipe>
|
</Recipe>
|
||||||
|
|
||||||
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Alias,Orchard.Autoroute,
|
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Alias,Orchard.Autoroute,
|
||||||
XmlRpc,Orchard.Blogs.RemotePublishing,
|
XmlRpc,Orchard.Blogs.RemotePublishing,Orchard.ContentPicker,
|
||||||
TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
|
TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
|
||||||
Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,
|
Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,
|
||||||
Orchard.Scripting,Orchard.Scripting.Lightweight,
|
Orchard.Scripting,Orchard.Scripting.Lightweight,
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
</Recipe>
|
</Recipe>
|
||||||
|
|
||||||
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Alias,Orchard.Autoroute,
|
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,Orchard.Alias,Orchard.Autoroute,
|
||||||
TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
|
TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.ContentPicker,Orchard.PublishLater,
|
||||||
Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,Orchard.ContentTypes,
|
Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,Orchard.ContentTypes,
|
||||||
Orchard.Scripting,Orchard.Scripting.Lightweight,
|
Orchard.Scripting,Orchard.Scripting.Lightweight,
|
||||||
PackagingServices,Orchard.Packaging,Orchard.Warmup,Orchard.Projections,Orchard.Fields,
|
PackagingServices,Orchard.Packaging,Orchard.Warmup,Orchard.Projections,Orchard.Fields,
|
||||||
|
Reference in New Issue
Block a user