mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Saving workflows in local storage during modification
--HG-- branch : 1.x extra : rebase_source : 40ce6c86f6f7ad428f758bf0db2fe43e8b0be3ef
This commit is contained in:
parent
88f316a557
commit
ebc77e9aae
@ -19,6 +19,9 @@ glob:*.ReSharper
|
||||
glob:*.orig
|
||||
glob:*.suo
|
||||
glob:src/Orchard.Web/Modules-temp/*
|
||||
glob:src/Backup/*
|
||||
glob:src/packages/*
|
||||
glob:src/UpgradeLog.*
|
||||
glob:*.itrace.csdef
|
||||
glob:*.build.csdef
|
||||
glob:src/Orchard.Azure/Orchard.Azure.Web/Core
|
||||
|
@ -21,6 +21,10 @@
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -46,6 +50,9 @@
|
||||
<HintPath>..\..\..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\lib\newtonsoft.json\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
@ -86,6 +93,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Services\FormParametersHelper.cs" />
|
||||
<Compile Include="Services\FormProcessor.cs" />
|
||||
<Compile Include="Services\IFormEvents.cs" />
|
||||
<Compile Include="Shapes\EditorShapes.cs" />
|
||||
|
@ -1,10 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Orchard.Data.Bags;
|
||||
|
||||
namespace Orchard.Projections.Services {
|
||||
namespace Orchard.Forms.Services {
|
||||
public static class FormParametersHelper {
|
||||
public static string ToString(IDictionary<string, string> parameters) {
|
||||
var doc = new XDocument();
|
||||
@ -60,5 +63,33 @@ namespace Orchard.Projections.Services {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static dynamic FromJsonString(string state) {
|
||||
if (string.IsNullOrWhiteSpace(state)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return JsonConvert.DeserializeObject(state);
|
||||
}
|
||||
|
||||
public static string ToJsonString(FormCollection formCollection) {
|
||||
var o = new JObject();
|
||||
|
||||
foreach (var key in formCollection.AllKeys) {
|
||||
o.Add(new JProperty(key, formCollection.Get(key)));
|
||||
}
|
||||
|
||||
return JsonConvert.SerializeObject(o);
|
||||
}
|
||||
|
||||
public static string ToJsonString(IDictionary<string, object> dictionary) {
|
||||
var o = new JObject();
|
||||
|
||||
foreach (var entry in dictionary) {
|
||||
o.Add(new JProperty(entry.Key, entry.Value));
|
||||
}
|
||||
|
||||
return JsonConvert.SerializeObject(o);
|
||||
}
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Projections.Descriptors.Filter;
|
||||
using Orchard.Projections.Descriptors.Layout;
|
||||
using Orchard.Projections.Descriptors.SortCriterion;
|
||||
|
@ -10,6 +10,7 @@ using Orchard.Core.Feeds;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Projections.Descriptors.Layout;
|
||||
using Orchard.Projections.Descriptors.Property;
|
||||
|
@ -213,7 +213,6 @@
|
||||
<Compile Include="Services\IPropertyService.cs" />
|
||||
<Compile Include="Services\LayoutProvider.cs" />
|
||||
<Compile Include="Services\ISortCriteriaProvider.cs" />
|
||||
<Compile Include="Services\FormParametersHelper.cs" />
|
||||
<Compile Include="Services\IFilterProvider.cs" />
|
||||
<Compile Include="Services\IProjectionManager.cs" />
|
||||
<Compile Include="Services\IQueryService.cs" />
|
||||
|
@ -4,6 +4,7 @@ using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Data;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Projections.Descriptors;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Projections.Descriptors.Property;
|
||||
|
@ -11,7 +11,7 @@ namespace Orchard.Workflows.Activities {
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public override bool CanTransition(ActivityContext context) {
|
||||
public override bool CanExecute(ActivityContext context) {
|
||||
string contenttypes = context.State.ContentTypes;
|
||||
var content = context.Tokens["Content"] as IContent;
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Orchard.Workflows.Activities {
|
||||
return new[] { T("Success") };
|
||||
}
|
||||
|
||||
public override LocalizedString Transition(ActivityContext context) {
|
||||
public override LocalizedString Execute(ActivityContext context) {
|
||||
return T("True");
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using Orchard.Workflows.Models.Descriptors;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Workflows.Activities {
|
||||
public class DecisionActivity : Activity {
|
||||
public class DecisionActivity : BaseActivity {
|
||||
|
||||
public DecisionActivity() {
|
||||
T = NullLocalizer.Instance;
|
||||
@ -28,7 +28,7 @@ namespace Orchard.Workflows.Activities {
|
||||
return new[] { T("True"), T("False") };
|
||||
}
|
||||
|
||||
public override LocalizedString Transition(ActivityContext context) {
|
||||
public override LocalizedString Execute(ActivityContext context) {
|
||||
return T("True");
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ using Orchard.Workflows.Models.Descriptors;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Workflows.Activities {
|
||||
public class NotificationActivity : Activity {
|
||||
public class NotificationActivity : BaseActivity {
|
||||
private readonly INotifier _notifier;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Orchard.Workflows.Activities {
|
||||
yield return T("Done");
|
||||
}
|
||||
|
||||
public override LocalizedString Transition(ActivityContext context) {
|
||||
public override LocalizedString Execute(ActivityContext context) {
|
||||
string notification = context.State.Notification;
|
||||
string message = context.State.Message;
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Contents.Controllers;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Themes;
|
||||
using System;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
@ -23,26 +24,29 @@ namespace Orchard.Workflows.Controllers {
|
||||
private readonly IOrchardServices _services;
|
||||
private readonly ISiteService _siteService;
|
||||
private readonly IRepository<WorkflowDefinitionRecord> _workflowDefinitionRecords;
|
||||
private readonly IEnumerable<IActivity> _activities;
|
||||
private readonly IActivitiesManager _activitiesManager;
|
||||
private readonly IFormManager _formManager;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices services,
|
||||
IShapeFactory shapeFactory,
|
||||
ISiteService siteService,
|
||||
IRepository<WorkflowDefinitionRecord> workflowDefinitionRecords,
|
||||
IEnumerable<IActivity> activities
|
||||
IActivitiesManager activitiesManager,
|
||||
IFormManager formManager
|
||||
) {
|
||||
_services = services;
|
||||
_siteService = siteService;
|
||||
_workflowDefinitionRecords = workflowDefinitionRecords;
|
||||
_activities = activities;
|
||||
_activitiesManager = activitiesManager;
|
||||
_formManager = formManager;
|
||||
Services = services;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
Shape = shapeFactory;
|
||||
New = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
dynamic New { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
@ -69,7 +73,7 @@ namespace Orchard.Workflows.Controllers {
|
||||
queries = queries.Where(w => w.Name.Contains(options.Search));
|
||||
}
|
||||
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(queries.Count());
|
||||
var pagerShape = New.Pager(pager).TotalItemCount(queries.Count());
|
||||
|
||||
switch (options.Order) {
|
||||
case WorkflowDefinitionOrder.Name:
|
||||
@ -124,20 +128,138 @@ namespace Orchard.Workflows.Controllers {
|
||||
return RedirectToAction("Edit", new { workflowDefinitionRecord.Id });
|
||||
}
|
||||
|
||||
public ActionResult Edit(int id) {
|
||||
public ActionResult Edit(int id, string localId) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// convert the workflow definition into its view model
|
||||
var workflowDefinitionRecord = _workflowDefinitionRecords.Get(id);
|
||||
var workflowDefinitionModel = new WorkflowDefinitionViewModel();
|
||||
|
||||
if (workflowDefinitionRecord != null) {
|
||||
workflowDefinitionModel.Id = workflowDefinitionRecord.Id;
|
||||
|
||||
foreach (var activityRecord in workflowDefinitionRecord.ActivityRecords) {
|
||||
workflowDefinitionModel.Activities.Add(new ActivityViewModel {
|
||||
Name = activityRecord.Type,
|
||||
ClientId = activityRecord.Type + "_" + activityRecord.Id,
|
||||
State = FormParametersHelper.FromString(activityRecord.State)
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var transitionRecord in workflowDefinitionRecord.TransitionRecords) {
|
||||
workflowDefinitionModel.Connections.Add(new ConnectionViewModel{
|
||||
Id = transitionRecord.Id,
|
||||
SourceClientId = transitionRecord.SourceActivityRecord.Type + "_" + transitionRecord.SourceActivityRecord.Id,
|
||||
DestinationClientId = transitionRecord.DestinationActivityRecord.Type + "_" + transitionRecord.DestinationActivityRecord.Id,
|
||||
Outcome = transitionRecord.DestinationEndpoint
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var viewModel = new AdminEditViewModel {
|
||||
WorkflowDefinitionRecord = workflowDefinitionRecord,
|
||||
AllActivities = _activities.ToList()
|
||||
LocalId = Guid.NewGuid().ToString(),
|
||||
WorkflowDefinition = workflowDefinitionModel,
|
||||
AllActivities = _activitiesManager.GetActivities()
|
||||
};
|
||||
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
public ActionResult EditLocal(string localId) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var viewModel = new AdminEditViewModel {
|
||||
LocalId = localId,
|
||||
AllActivities = _activitiesManager.GetActivities()
|
||||
};
|
||||
|
||||
return View("Edit", viewModel);
|
||||
}
|
||||
|
||||
[Themed(false)]
|
||||
[HttpPost]
|
||||
public ActionResult RenderActivity(ActivityViewModel model) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var activity = _activitiesManager.GetActivityByName(model.Name);
|
||||
|
||||
if (activity == null) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
IShape shape = New.Activity(activity);
|
||||
shape.Metadata.Alternates.Add("Activity__" + activity.Name);
|
||||
|
||||
return new ShapeResult(this, shape);
|
||||
}
|
||||
|
||||
public ActionResult EditActivity(string localId, ActivityViewModel model) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var activity = _activitiesManager.GetActivityByName(model.Name);
|
||||
|
||||
if (activity == null) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
// build the form, and let external components alter it
|
||||
var form = activity.Form == null ? null : _formManager.Build(activity.Form);
|
||||
|
||||
// bind form with existing values.
|
||||
if (model.State != null) {
|
||||
_formManager.Bind(form, new DictionaryValueProvider<string>(model.State, CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
var viewModel = New.ViewModel(LocalId: localId, Form: form);
|
||||
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("EditActivity")]
|
||||
[FormValueRequired("submit.Save")]
|
||||
public ActionResult EditActivityPost(int id, string localId, string name, string clientId, FormCollection formValues) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var activity = _activitiesManager.GetActivityByName(name);
|
||||
|
||||
if (activity == null) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
// validating form values
|
||||
_formManager.Validate(new ValidatingContext { FormName = activity.Form, ModelState = ModelState, ValueProvider = ValueProvider });
|
||||
|
||||
// stay on the page if there are validation errors
|
||||
if (!ModelState.IsValid) {
|
||||
|
||||
// build the form, and let external components alter it
|
||||
var form = activity.Form == null ? null : _formManager.Build(activity.Form);
|
||||
|
||||
// bind form with existing values.
|
||||
_formManager.Bind(form, ValueProvider);
|
||||
|
||||
var viewModel = New.ViewModel(Id: id, LocalId: localId, Form: form);
|
||||
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
return RedirectToAction("EditLocal", new {localId});
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("EditActivity")]
|
||||
[FormValueRequired("submit.Cancel")]
|
||||
public ActionResult EditActivityPostCancel(string localId, string name, string clientId, FormCollection formValues) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
return RedirectToAction("EditLocal", new {localId });
|
||||
}
|
||||
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace Orchard.Workflows {
|
||||
SchemaBuilder.CreateTable("ActivityRecord", table => table
|
||||
.Column<int>("Id", column => column.PrimaryKey().Identity())
|
||||
.Column<string>("Type")
|
||||
.Column<string>("Parameters")
|
||||
.Column<string>("State", c => c.Unlimited())
|
||||
.Column<int>("WorkflowDefinitionRecord_id")
|
||||
);
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
namespace Orchard.Workflows.Models {
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
namespace Orchard.Workflows.Models {
|
||||
/// <summary>
|
||||
/// Represents an activity in a <see cref="WorkflowDefinitionRecord"/>
|
||||
/// </summary>
|
||||
@ -11,9 +13,10 @@
|
||||
public virtual string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The serialized parameters of the activity.
|
||||
/// The serialized state of the activity.
|
||||
/// </summary>
|
||||
public virtual string Parameters { get; set; }
|
||||
[StringLengthMax]
|
||||
public virtual string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The parent <see cref="WorkflowDefinitionRecord"/>
|
||||
|
@ -65,6 +65,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\jquery.jsPlumb-1.3.16-all-min.js" />
|
||||
<Content Include="Scripts\orchard-workflows.js" />
|
||||
<Content Include="Styles\admin-workflows.css" />
|
||||
<Content Include="Styles\images\blocking.png" />
|
||||
<Content Include="Web.config" />
|
||||
@ -113,7 +114,7 @@
|
||||
<Compile Include="Providers\ContentActivityForms.cs" />
|
||||
<Compile Include="Providers\NotificationActivityForms.cs" />
|
||||
<Compile Include="Providers\NotificationActivityProvider.cs" />
|
||||
<Compile Include="Services\Activity.cs" />
|
||||
<Compile Include="Services\BaseActivity.cs" />
|
||||
<Compile Include="Services\BlockingActivity.cs" />
|
||||
<Compile Include="Services\IActivity.cs" />
|
||||
<Compile Include="Services\IActivityProvider.cs" />
|
||||
@ -121,6 +122,7 @@
|
||||
<Compile Include="Services\IActivitiesManager.cs" />
|
||||
<Compile Include="ViewModels\AdminEditViewModel.cs" />
|
||||
<Compile Include="ViewModels\AdminIndexViewModel.cs" />
|
||||
<Compile Include="ViewModels\WorkflowDefinitionViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Handlers\" />
|
||||
@ -140,6 +142,12 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Activity.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\EditActivity.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\ActivityToolbox.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
@ -0,0 +1,66 @@
|
||||
|
||||
var saveLocal = function () {
|
||||
var wokflow = {
|
||||
activities: [],
|
||||
connections: []
|
||||
};
|
||||
|
||||
var allActivities = $('.activity');
|
||||
for (var i = 0; i < allActivities.length; i++) {
|
||||
var activity = allActivities[i];
|
||||
|
||||
wokflow.activities.push({
|
||||
name: activity.viewModel.name,
|
||||
clientId: activity.viewModel.clientId,
|
||||
state: activity.viewModel.state,
|
||||
left: $(activity).position().left,
|
||||
top: $(activity).position().top
|
||||
});
|
||||
}
|
||||
|
||||
var allConnections = jsPlumb.getConnections();
|
||||
for (var i = 0; i < allConnections.length; i++) {
|
||||
var connection = allConnections[i];
|
||||
|
||||
wokflow.connections.push({
|
||||
sourceId: connection.sourceId,
|
||||
targetId: connection.targetId,
|
||||
sourceEndpoint: connection.endpoints[0].outcome,
|
||||
//targetEndpoint: connection.targetEndpoint
|
||||
});
|
||||
}
|
||||
// serialize the object
|
||||
sessionStorage.setItem(localId, JSON.stringify(wokflow));
|
||||
};
|
||||
|
||||
var loadActivities = function () {
|
||||
var workflow = sessionStorage.getItem(localId);
|
||||
|
||||
if (!workflow) {
|
||||
return;
|
||||
}
|
||||
|
||||
// deserialize
|
||||
workflow = JSON.parse(workflow);
|
||||
|
||||
// activities
|
||||
for (var i = 0; i < workflow.activities.length; i++) {
|
||||
var activity = workflow.activities[i];
|
||||
renderActivity(activity.clientId, activity.name, activity.state, activity.top, activity.left);
|
||||
}
|
||||
|
||||
// connections
|
||||
for (var i = 0; i < workflow.connections.length; i++) {
|
||||
var connection = workflow.connections[i];
|
||||
|
||||
var source = document.getElementById(connection.sourceId);
|
||||
var ep = source.endpoints[connection.sourceEndpoint];
|
||||
|
||||
jsPlumb.connect({
|
||||
source: ep,
|
||||
target: connection.targetId,
|
||||
newConnection: true
|
||||
|
||||
});
|
||||
}
|
||||
};
|
@ -0,0 +1,144 @@
|
||||
var connectorPaintStyle = {
|
||||
lineWidth: 3,
|
||||
strokeStyle: "grey",
|
||||
joinstyle: "round",
|
||||
//outlineColor: "white",
|
||||
//outlineWidth: 7
|
||||
};
|
||||
|
||||
var connectorHoverStyle = {
|
||||
lineWidth: 3,
|
||||
strokeStyle: "#2e2aF8"
|
||||
};
|
||||
|
||||
var sourceEndpointOptions = {
|
||||
endpoint: "Dot",
|
||||
paintStyle: { fillStyle: "#225588", radius: 7 },
|
||||
isSource: true,
|
||||
isTarget: false,
|
||||
connector: ["Flowchart"], // gap needs to be the same as makeTarget.paintStyle.radius
|
||||
connectorStyle: connectorPaintStyle,
|
||||
hoverPaintStyle: connectorHoverStyle,
|
||||
connectorHoverStyle: connectorHoverStyle,
|
||||
overlays: [["Label", { location: [0.5, 1.5], cssClass: "sourceEndpointLabel" }]]
|
||||
};
|
||||
|
||||
jsPlumb.bind("ready", function () {
|
||||
|
||||
jsPlumb.importDefaults({
|
||||
// default drag options
|
||||
DragOptions: { cursor: 'pointer', zIndex: 2000 },
|
||||
// default to blue at one end and green at the other
|
||||
EndpointStyles: [{ fillStyle: '#225588' }, { fillStyle: '#558822' }],
|
||||
// blue endpoints 7 px; green endpoints 11.
|
||||
Endpoints: [["Dot", { radius: 7 }], ["Dot", { radius: 7 }]],
|
||||
// the overlays to decorate each connection with. note that the label overlay uses a function to generate the label text; in this
|
||||
// case it returns the 'labelText' member that we set on each connection in the 'init' method below.
|
||||
ConnectionOverlays: [
|
||||
["Arrow", { width: 12, length: 12, location: 1 }],
|
||||
// ["Label", { location: 0.1, id: "label", cssClass: "aLabel" }]
|
||||
],
|
||||
ConnectorZIndex: 5
|
||||
});
|
||||
|
||||
// deserialize the previously locally saved workflow
|
||||
loadActivities(localId);
|
||||
|
||||
// a new connection is created
|
||||
jsPlumb.bind("jsPlumbConnection", function (connectionInfo) {
|
||||
// ...update your data model here. The contents of the 'connectionInfo' are described below.
|
||||
});
|
||||
|
||||
// a connection is detached
|
||||
jsPlumb.bind("jsPlumbConnectionDetached", function (connectionInfo) {
|
||||
// ...update your data model here. The contents of the 'connectionInfo' are described below.
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// instanciates a new workflow widget in the editor
|
||||
var createActivity = function (activityName) {
|
||||
renderActivity(null, activityName, {}, 10, 10);
|
||||
};
|
||||
|
||||
|
||||
// create a new activity node on the editor
|
||||
$('.activity-toolbox-item').on('click', function () {
|
||||
var self = $(this);
|
||||
var activityName = self.data('activity-name');
|
||||
createActivity(activityName);
|
||||
});
|
||||
|
||||
var renderActivity = function (clientId, name, state, top, left) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: renderActivityUrl,
|
||||
data: { name: name, state: state, __RequestVerificationToken: requestAntiForgeryToken },
|
||||
async: false,
|
||||
success: function(data) {
|
||||
var dom = $(data);
|
||||
|
||||
if (dom == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
dom.addClass('activity');
|
||||
|
||||
if (clientId) {
|
||||
dom.attr('id', clientId);
|
||||
}
|
||||
|
||||
var editor = $('#activity-editor');
|
||||
editor.append(dom);
|
||||
|
||||
jsPlumb.draggable(dom, { containment: "parent", scroll: true });
|
||||
|
||||
jsPlumb.makeTarget(dom, {
|
||||
dropOptions: { hoverClass: "dragHover" },
|
||||
anchor: "Continuous",
|
||||
endpoint: "Blank",
|
||||
paintStyle: { fillStyle: "#558822", radius: 3 },
|
||||
});
|
||||
|
||||
var elt = dom.get(0);
|
||||
elt.viewModel = {
|
||||
name: name,
|
||||
state: state,
|
||||
clientId: dom.attr("id"),
|
||||
};
|
||||
|
||||
elt.endpoints = {};
|
||||
|
||||
var outcomes = activities[name].outcomes;
|
||||
for (i = 0; i < outcomes.length; i++) {
|
||||
var ep = jsPlumb.addEndpoint(dom, {
|
||||
anchor: "Continuous",
|
||||
connectorOverlays: [["Label", { label: outcomes[i], cssClass: "connection-label" }]],
|
||||
},
|
||||
sourceEndpointOptions);
|
||||
|
||||
elt.endpoints[outcomes[i]] = ep;
|
||||
ep.outcome = outcomes[i];
|
||||
//ep.setLabel(outcomes[i]);
|
||||
}
|
||||
|
||||
if (activities[name].hasForm) {
|
||||
dom.dblclick(function() {
|
||||
saveLocal();
|
||||
window.location.href = editActivityUrl + "/0?name=" + name + "&clientId=" + elt.viewModel.clientId + "&localId=" + localId;
|
||||
});
|
||||
}
|
||||
|
||||
dom.css('top', top + 'px');
|
||||
dom.css('left', left + 'px');
|
||||
jsPlumb.repaint(elt.viewModel.clientId);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@ -1,55 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Caching;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.Workflows.Models.Descriptors;
|
||||
using System.Linq;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Workflows.Services {
|
||||
public class ActivitiesManager : IActivitiesManager{
|
||||
private const string SignalName = "Orchard.Workflows.Services.ActivitiesManager";
|
||||
public class ActivitiesManager : IActivitiesManager {
|
||||
private readonly IEnumerable<IActivity> _activities;
|
||||
|
||||
private readonly ITokenizer _tokenizer;
|
||||
private readonly IEnumerable<IActivityProvider> _activityProviders;
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ICacheManager _cacheManager;
|
||||
private readonly ISignals _signals;
|
||||
|
||||
public ActivitiesManager(
|
||||
ITokenizer tokenizer,
|
||||
IEnumerable<IActivityProvider> activityProviders,
|
||||
IContentManager contentManager,
|
||||
ICacheManager cacheManager,
|
||||
ISignals signals) {
|
||||
_tokenizer = tokenizer;
|
||||
_activityProviders = activityProviders;
|
||||
_contentManager = contentManager;
|
||||
_cacheManager = cacheManager;
|
||||
_signals = signals;
|
||||
T = NullLocalizer.Instance;
|
||||
public ActivitiesManager(IEnumerable<IActivity> activities) {
|
||||
_activities = activities;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public IEnumerable<TypeDescriptor<ActivityDescriptor>> DescribeActivities() {
|
||||
return _cacheManager.Get("activities", ctx => {
|
||||
MonitorSignal(ctx);
|
||||
|
||||
var context = new DescribeActivityContext();
|
||||
|
||||
foreach (var provider in _activityProviders) {
|
||||
provider.Describe(context);
|
||||
}
|
||||
return context.Describe();
|
||||
});
|
||||
public IEnumerable<IActivity> GetActivities() {
|
||||
return _activities.ToReadOnlyCollection();
|
||||
}
|
||||
|
||||
private void MonitorSignal(AcquireContext<string> ctx) {
|
||||
ctx.Monitor(_signals.When(SignalName));
|
||||
}
|
||||
|
||||
private void TriggerSignal() {
|
||||
_signals.Trigger(SignalName);
|
||||
public IActivity GetActivityByName(string name) {
|
||||
return _activities.FirstOrDefault(x => x.Name == name);
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ using Orchard.Localization;
|
||||
using Orchard.Workflows.Models.Descriptors;
|
||||
|
||||
namespace Orchard.Workflows.Services {
|
||||
public abstract class Activity : IActivity {
|
||||
public abstract class BaseActivity : IActivity {
|
||||
|
||||
public abstract string Name { get; }
|
||||
public abstract LocalizedString Category { get; }
|
||||
@ -19,10 +19,10 @@ namespace Orchard.Workflows.Services {
|
||||
|
||||
public abstract IEnumerable<LocalizedString> GetPossibleOutcomes(ActivityContext context);
|
||||
|
||||
public virtual bool CanTransition(ActivityContext context) {
|
||||
public virtual bool CanExecute(ActivityContext context) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract LocalizedString Transition(ActivityContext context);
|
||||
public abstract LocalizedString Execute(ActivityContext context);
|
||||
}
|
||||
}
|
@ -19,10 +19,10 @@ namespace Orchard.Workflows.Services {
|
||||
|
||||
public abstract IEnumerable<LocalizedString> GetPossibleOutcomes(ActivityContext context);
|
||||
|
||||
public virtual bool CanTransition(ActivityContext context) {
|
||||
public virtual bool CanExecute(ActivityContext context) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract LocalizedString Transition(ActivityContext context);
|
||||
public abstract LocalizedString Execute(ActivityContext context);
|
||||
}
|
||||
}
|
@ -1,10 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Workflows.Models.Descriptors;
|
||||
|
||||
namespace Orchard.Workflows.Services {
|
||||
public interface IActivitiesManager : IDependency {
|
||||
IEnumerable<TypeDescriptor<ActivityDescriptor>> DescribeActivities();
|
||||
IEnumerable<IActivity> GetActivities();
|
||||
IActivity GetActivityByName(string name);
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Workflows.Models.Descriptors;
|
||||
|
||||
@ -14,8 +11,20 @@ namespace Orchard.Workflows.Services {
|
||||
bool IsBlocking { get; }
|
||||
string Form { get; }
|
||||
|
||||
/// <summary>
|
||||
/// List of possible outcomes when the activity is executed
|
||||
/// </summary>
|
||||
IEnumerable<LocalizedString> GetPossibleOutcomes(ActivityContext context);
|
||||
bool CanTransition(ActivityContext context);
|
||||
LocalizedString Transition(ActivityContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the activity can transition to the next outcome. Can prevent the activity from being transitioned
|
||||
/// because a condition is not valid.
|
||||
/// </summary>
|
||||
bool CanExecute(ActivityContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Executes the current activity
|
||||
/// </summary>
|
||||
LocalizedString Execute(ActivityContext context);
|
||||
}
|
||||
}
|
@ -57,7 +57,7 @@
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.editor {
|
||||
#activity-editor {
|
||||
position: relative;
|
||||
height:auto !important; /* real browsers */
|
||||
min-height:500px; /* real browsers */
|
||||
|
@ -4,7 +4,8 @@ using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Workflows.ViewModels {
|
||||
public class AdminEditViewModel {
|
||||
public WorkflowDefinitionRecord WorkflowDefinitionRecord { get; set; }
|
||||
public string LocalId { get; set; }
|
||||
public IEnumerable<IActivity> AllActivities { get; set; }
|
||||
public WorkflowDefinitionViewModel WorkflowDefinition { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Orchard.Workflows.ViewModels {
|
||||
public class WorkflowDefinitionViewModel {
|
||||
public WorkflowDefinitionViewModel() {
|
||||
Activities = new List<ActivityViewModel>();
|
||||
Connections = new List<ConnectionViewModel>();
|
||||
}
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used to prevent client side LocalStorage conflicts
|
||||
/// </summary>
|
||||
public string Tenant { get; set; }
|
||||
|
||||
public List<ActivityViewModel> Activities { get; set; }
|
||||
public List<ConnectionViewModel> Connections { get; set; }
|
||||
}
|
||||
|
||||
public class ActivityViewModel {
|
||||
/// <summary>
|
||||
/// The local id used for connections
|
||||
/// </summary>
|
||||
public string ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the activity
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
public IDictionary<string, string> State { get; set; }
|
||||
}
|
||||
|
||||
public class ConnectionViewModel {
|
||||
public int Id { get; set; }
|
||||
public string SourceClientId { get; set; }
|
||||
public string Outcome { get; set; }
|
||||
|
||||
public string DestinationClientId { get; set; }
|
||||
}
|
||||
|
||||
}
|
@ -6,6 +6,6 @@
|
||||
string blockingClass = blocking ? "blocking" : null;
|
||||
}
|
||||
|
||||
<div class="activity @blockingClass" style="background-color: pink">
|
||||
<div class="@blockingClass" style="background-color: pink">
|
||||
@name.CamelFriendly()
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
bool blocking = Model.IsBlocking;
|
||||
}
|
||||
|
||||
<div class="activity @blocking">
|
||||
<div class="@blocking">
|
||||
@name.CamelFriendly()
|
||||
</div>
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
@using Orchard.DisplayManagement
|
||||
@using Orchard.Workflows.Models.Descriptors
|
||||
@using Orchard.Workflows.Services
|
||||
|
||||
@{
|
||||
IList<IActivity> allActivities = Model.AllActivities;
|
||||
|
||||
}
|
||||
<!-- List of available activities -->
|
||||
<div id="activity-toolbox">
|
||||
<ul>
|
||||
@foreach (var activity in allActivities) {
|
||||
<li class="activity-toolbox-item" data-activity-name="@activity.Name">
|
||||
<h2>@activity.Name</h2>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@* Render script to initialize a new jsplumb shape in the form of activities['activity-name'].create() *@
|
||||
@using (Script.Foot()) {
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var activities = { @foreach (var activity in allActivities) { <text>
|
||||
'@activity.Name': {
|
||||
outcomes: [ @Html.Raw("'" + String.Join("', '", activity.GetPossibleOutcomes(new ActivityContext()).Select(x => HttpUtility.JavaScriptStringEncode(x.Text)).ToArray()) + "'")],
|
||||
category: '@activity.Category.Text',
|
||||
description: '@activity.Description.Text',
|
||||
isBlocking: @(activity.IsBlocking ? "true" : "false"),
|
||||
hasForm: @(!String.IsNullOrWhiteSpace(activity.Form) ? "true" : "false")
|
||||
},</text>
|
||||
}
|
||||
|
||||
};
|
||||
//]]>
|
||||
</script>
|
||||
}
|
@ -14,139 +14,29 @@
|
||||
Script.Include("jquery.jsPlumb-1.3.16-all-min.js");
|
||||
|
||||
// var editorShape = ((IShapeFactory)New).Create(activity.Name + "_Editor");
|
||||
|
||||
}
|
||||
|
||||
<!-- List of available activities -->
|
||||
<div id="activity-toolbox">
|
||||
<ul>
|
||||
@foreach (var activity in Model.AllActivities) {
|
||||
IShape shape = New.Activity(activity);
|
||||
shape.Metadata.Alternates.Add("Activity__" + activity.Name);
|
||||
|
||||
<li class="activity-toolbox-item" data-activity-name="@activity.Name">
|
||||
<h2>@activity.Name</h2>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@Display.ActivityToolbox(Model)
|
||||
@{
|
||||
Script.Include("orchard-workflows.js").AtFoot();
|
||||
Script.Include("orchard-workflows-serialize.js").AtFoot();
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
|
||||
<div class="editor">
|
||||
<div id="activity-editor">
|
||||
</div>
|
||||
}
|
||||
|
||||
@* Render script to initialize a new jsplumb shapes in the form of activities['activity-name'].create() *@
|
||||
@using (Script.Foot()) {
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var activities = {};
|
||||
@foreach (var activity in Model.AllActivities) {
|
||||
IShape shape = New.Activity(activity);
|
||||
shape.Metadata.Alternates.Add("Activity__" + activity.Name);
|
||||
<text>
|
||||
activities['@activity.Name'] = {};
|
||||
activities['@activity.Name']['create'] = function () {
|
||||
var dom = $('@Html.Raw(HttpUtility.JavaScriptStringEncode(Display(shape).ToString()))');
|
||||
var editor = $('.editor');
|
||||
editor.append(dom);
|
||||
jsPlumb.draggable(dom, { containment: "parent", scroll: true });
|
||||
|
||||
jsPlumb.makeTarget(dom, {
|
||||
dropOptions: { hoverClass: "dragHover" },
|
||||
anchor: "Continuous",
|
||||
endpoint: "Blank",
|
||||
paintStyle: { fillStyle: "#558822", radius: 3 },
|
||||
});
|
||||
</text>
|
||||
|
||||
var outcomes = activity.GetPossibleOutcomes(null);
|
||||
foreach(var outcome in outcomes) {
|
||||
<text>
|
||||
jsPlumb.addEndpoint(dom, {
|
||||
anchor: "Continuous",
|
||||
connectorOverlays: [["Label", { label: "@HttpUtility.JavaScriptStringEncode(outcome.ToString())", cssClass: "connection-label" }]],
|
||||
}, sourceEndpointOptions);
|
||||
</text>
|
||||
}
|
||||
|
||||
<text>
|
||||
};
|
||||
</text>
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
}
|
||||
|
||||
@using (Script.Foot()) {
|
||||
@using (Script.Head()) {
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var connectorPaintStyle = {
|
||||
lineWidth: 3,
|
||||
strokeStyle: "grey",
|
||||
joinstyle: "round",
|
||||
//outlineColor: "white",
|
||||
//outlineWidth: 7
|
||||
};
|
||||
var renderActivityUrl = '@Url.Action("RenderActivity", "Admin", new { area = "Orchard.Workflows" })';
|
||||
var editActivityUrl = '@Url.Action("EditActivity", "Admin", new { area = "Orchard.Workflows" })';
|
||||
var requestAntiForgeryToken = '@Html.AntiForgeryTokenValueOrchard()';
|
||||
var localId = '@Model.LocalId';
|
||||
|
||||
var connectorHoverStyle = {
|
||||
lineWidth: 3,
|
||||
strokeStyle: "#2e2aF8"
|
||||
};
|
||||
|
||||
var sourceEndpointOptions = {
|
||||
endpoint: "Dot",
|
||||
paintStyle: { fillStyle: "#225588", radius: 7 },
|
||||
isSource: true,
|
||||
isTarget: false,
|
||||
connector: ["Flowchart"], // gap needs to be the same as makeTarget.paintStyle.radius
|
||||
connectorStyle: connectorPaintStyle,
|
||||
hoverPaintStyle: connectorHoverStyle,
|
||||
connectorHoverStyle: connectorHoverStyle,
|
||||
overlays: [["Label", { location: [0.5, 1.5], cssClass: "sourceEndpointLabel" }]]
|
||||
};
|
||||
|
||||
jsPlumb.bind("ready", function() {
|
||||
|
||||
jsPlumb.importDefaults({
|
||||
// default drag options
|
||||
DragOptions : { cursor: 'pointer', zIndex:2000 },
|
||||
// default to blue at one end and green at the other
|
||||
EndpointStyles : [{ fillStyle:'#225588' }, { fillStyle:'#558822' }],
|
||||
// blue endpoints 7 px; green endpoints 11.
|
||||
Endpoints : [ [ "Dot", {radius:7} ], [ "Dot", { radius:7 } ]],
|
||||
// the overlays to decorate each connection with. note that the label overlay uses a function to generate the label text; in this
|
||||
// case it returns the 'labelText' member that we set on each connection in the 'init' method below.
|
||||
ConnectionOverlays: [
|
||||
["Arrow", { width: 12, length: 12, location: 1 }],
|
||||
// ["Label", { location: 0.1, id: "label", cssClass: "aLabel" }]
|
||||
],
|
||||
ConnectorZIndex:5
|
||||
});
|
||||
|
||||
//jsPlumb.bind("jsPlumbConnection", function (connInfo, originalEvent) {
|
||||
// init(connInfo.connection);
|
||||
//});
|
||||
});
|
||||
|
||||
// a new connection is created
|
||||
jsPlumb.bind("jsPlumbConnection", function(connectionInfo) {
|
||||
// ...update your data model here. The contents of the 'connectionInfo' are described below.
|
||||
});
|
||||
|
||||
// a connection is detached
|
||||
jsPlumb.bind("jsPlumbConnectionDetached", function(connectionInfo) {
|
||||
// ...update your data model here. The contents of the 'connectionInfo' are described below.
|
||||
});
|
||||
|
||||
// create a new activity node on the editor
|
||||
$('.activity-toolbox-item').on('click', function () {
|
||||
var self = $(this);
|
||||
var activityName = self.data('activity-name');
|
||||
activities[activityName].create();
|
||||
});
|
||||
//]]>
|
||||
//]]>
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
|
||||
@{
|
||||
SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
|
||||
Style.Include("~/themes/theadmin/styles/site.css");
|
||||
Style.Include("~/themes/theadmin/styles/ie.css").UseCondition("lte IE 8").SetAttribute("media", "screen, projection");
|
||||
Style.Include("~/themes/theadmin/styles/ie6.css").UseCondition("lte IE 6").SetAttribute("media", "screen, projection");
|
||||
|
||||
Layout.Title = @T("Edit Activity");
|
||||
}
|
||||
|
||||
@Html.ValidationSummary()
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
|
||||
@* Render the dynamic form *@
|
||||
if (Model.Form != null) {
|
||||
<fieldset>
|
||||
@DisplayChildren(Model.Form)
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
@Display.TokenHint()
|
||||
|
||||
<fieldset>
|
||||
<button class="primaryAction" type="submit" name="submit.Save" value="@T("Save")">@T("Save")</button>
|
||||
<button class="cancel" type="submit" name="submit.Cancel" value="@T("Cancel")">@T("Cancel")</button>
|
||||
</fieldset>
|
||||
}
|
@ -146,6 +146,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpgradeTo16", "Orchard.Web\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Workflows", "Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj", "{7059493C-8251-4764-9C1E-2368B8B485BC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contrib.ProjectionLayouts", "Orchard.Web\Modules\Contrib.ProjectionLayouts\Contrib.ProjectionLayouts.csproj", "{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contrib.Cache", "Orchard.Web\Modules\Contrib.Cache\Contrib.Cache.csproj", "{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contrib.Cache.Database", "Orchard.Web\Modules\Contrib.Cache.Database\Contrib.Cache.Database.csproj", "{8F11BF7F-4A64-4474-B6D2-83FC796E6210}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contrib.Cache.Memcached", "Orchard.Web\Modules\Contrib.Cache.Memcached\Contrib.Cache.Memcached.csproj", "{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Caching", "Orchard.Web\Modules\Orchard.Caching\Orchard.Caching.csproj", "{7528BF74-25C7-4ABE-883A-443B4EEC4776}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Memcached", "Orchard.Web\Modules\Memcached\Memcached.csproj", "{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Caching.Memcached", "Orchard.Web\Modules\Orchard.Caching.Memcached\Orchard.Caching.Memcached.csproj", "{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contrib.Taxonomies", "Orchard.Web\Modules\Contrib.Taxonomies\Contrib.Taxonomies.csproj", "{E649EA64-D213-461B-87F7-D67035801443}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@ -817,6 +833,74 @@ Global
|
||||
{7059493C-8251-4764-9C1E-2368B8B485BC}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7059493C-8251-4764-9C1E-2368B8B485BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7059493C-8251-4764-9C1E-2368B8B485BC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -872,6 +956,14 @@ Global
|
||||
{3BD22132-D538-48C6-8854-F71333C798EB} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{7059493C-8251-4764-9C1E-2368B8B485BC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{B56F33C8-F0E6-4BD8-AC2D-6A3204E09BEE} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{6E444FF1-A47C-4CF6-BB3F-507C8EBD776D} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{8F11BF7F-4A64-4474-B6D2-83FC796E6210} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{E7C77EE1-0F7F-4BA4-9849-653322A0BE8A} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{7528BF74-25C7-4ABE-883A-443B4EEC4776} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{4A037ACB-A79A-43A9-9E7D-E8F1BF7AEB91} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{A2C5BAE0-E4A0-4B41-BC44-D4099E471111} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{E649EA64-D213-461B-87F7-D67035801443} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
|
@ -177,6 +177,14 @@
|
||||
<Compile Include="ContentManagement\MetaData\Services\ISettingsFormatter.cs" />
|
||||
<Compile Include="ContentManagement\QueryHints.cs" />
|
||||
<Compile Include="ContentManagement\Utilities\ComputedField.cs" />
|
||||
<Compile Include="Data\Bags\SArray.cs" />
|
||||
<Compile Include="Data\Bags\SConvert.cs" />
|
||||
<Compile Include="Data\Bags\Serialization\IBagSerializer.cs" />
|
||||
<Compile Include="Data\Bags\Serialization\XmlSettingsSerializer.cs" />
|
||||
<Compile Include="Data\Bags\SItem.cs" />
|
||||
<Compile Include="Data\Bags\SObject.cs" />
|
||||
<Compile Include="Data\Bags\StateValueProvider.cs" />
|
||||
<Compile Include="Data\Bags\SValue.cs" />
|
||||
<Compile Include="Data\Conventions\AggregateAttribute.cs" />
|
||||
<Compile Include="Data\Conventions\CacheConvention.cs" />
|
||||
<Compile Include="Data\DefaultDatabaseCacheConfiguration.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user