forked from vladcheg/Sitecore.DataExchange.Gutters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from KayeeNL/feature/NugetPackages_Introduction
Feature/nuget packages introduction
- Loading branch information
Showing
18 changed files
with
257 additions
and
243 deletions.
There are no files selected for viewing
30 changes: 14 additions & 16 deletions
30
Sitecore.DataExchange.Gutters/App_Config/Include/Sitecore.DataExchange.Gutters.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | ||
<sitecore> | ||
<commands> | ||
<command name="dataExchange:enableItem" type="Sitecore.DataExchange.Gutters.Commands.EnableItemCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:showEnable" type="Sitecore.DataExchange.Gutters.Commands.ShowEnableCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:pipelineBatchContextMenu" type="Sitecore.DataExchange.Gutters.Commands.PipelineBatchContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:cleanPipelineBatchSummary" type="Sitecore.DataExchange.Gutters.Commands.CleanPipelineBatchSummaryCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:displayPipelineSteps" type="Sitecore.DataExchange.Gutters.Commands.DisplayPipelineStepsCommand, Sitecore.DataExchange.Gutters" /> | ||
|
||
<command name="dataExchange:valueMappingContextMenu" type="Sitecore.DataExchange.Gutters.Commands.ValueMappingContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:referenceMenu" type="Sitecore.DataExchange.Gutters.Commands.ReferenceMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:goToReference" type="Sitecore.DataExchange.Gutters.Commands.GoToReferenceCommand, Sitecore.DataExchange.Gutters" /> | ||
|
||
<command name="dataExchange:pipelineStepContextMenu" type="Sitecore.DataExchange.Gutters.Commands.PipelineStepContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:displayRequired" type="Sitecore.DataExchange.Gutters.Commands.DisplayRequiredCommand, Sitecore.DataExchange.Gutters" /> | ||
</commands> | ||
</sitecore> | ||
<sitecore> | ||
<commands> | ||
<command name="dataExchange:enableItem" type="Sitecore.DataExchange.Gutters.Commands.EnableItemCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:showEnable" type="Sitecore.DataExchange.Gutters.Commands.ShowEnableCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:pipelineBatchContextMenu" type="Sitecore.DataExchange.Gutters.Commands.PipelineBatchContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:cleanPipelineBatchSummary" type="Sitecore.DataExchange.Gutters.Commands.CleanPipelineBatchSummaryCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:displayPipelineSteps" type="Sitecore.DataExchange.Gutters.Commands.DisplayPipelineStepsCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:valueMappingContextMenu" type="Sitecore.DataExchange.Gutters.Commands.ValueMappingContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:referenceMenu" type="Sitecore.DataExchange.Gutters.Commands.ReferenceMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:goToReference" type="Sitecore.DataExchange.Gutters.Commands.GoToReferenceCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:pipelineStepContextMenu" type="Sitecore.DataExchange.Gutters.Commands.PipelineStepContextMenuCommand, Sitecore.DataExchange.Gutters" /> | ||
<command name="dataExchange:displayRequired" type="Sitecore.DataExchange.Gutters.Commands.DisplayRequiredCommand, Sitecore.DataExchange.Gutters" /> | ||
</commands> | ||
</sitecore> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
Sitecore.DataExchange.Gutters/Commands/EnableItemCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
namespace Sitecore.DataExchange.Gutters.Commands | ||
{ | ||
using System; | ||
using Data.Items; | ||
using Diagnostics; | ||
using Globalization; | ||
using Shell.Framework.Commands; | ||
using Sitecore.Diagnostics; | ||
using Version = Data.Version; | ||
using System; | ||
using Sitecore.Configuration; | ||
using Sitecore.Data.Items; | ||
using Sitecore.Diagnostics; | ||
using Sitecore.Globalization; | ||
using Sitecore.Shell.Framework.Commands; | ||
using Version = Sitecore.Data.Version; | ||
|
||
[Serializable] | ||
public class EnableItemCommand: Command | ||
{ | ||
public override void Execute(CommandContext context) | ||
namespace Sitecore.DataExchange.Gutters.Commands | ||
{ | ||
[Serializable] | ||
public class EnableItemCommand : Command | ||
{ | ||
Assert.ArgumentNotNull(context, nameof(context)); | ||
string database = context.Parameters["database"]; | ||
string id = context.Parameters["id"]; | ||
string language = context.Parameters["language"]; | ||
string version = context.Parameters["version"]; | ||
public override void Execute(CommandContext context) | ||
{ | ||
Assert.ArgumentNotNull(context, nameof(context)); | ||
var database = context.Parameters["database"]; | ||
var id = context.Parameters["id"]; | ||
var language = context.Parameters["language"]; | ||
var version = context.Parameters["version"]; | ||
|
||
var db = Sitecore.Configuration.Factory.GetDatabase(database); | ||
var item = db.GetItem(id, Language.Parse(language), Version.Parse(version)); | ||
var db = Factory.GetDatabase(database); | ||
var item = db.GetItem(id, Language.Parse(language), Version.Parse(version)); | ||
|
||
using (new EditContext(item)) | ||
{ | ||
item["Enabled"] = "1"; | ||
} | ||
using (new EditContext(item)) | ||
{ | ||
item["Enabled"] = "1"; | ||
} | ||
} | ||
} | ||
} | ||
} |
16 changes: 9 additions & 7 deletions
16
Sitecore.DataExchange.Gutters/Commands/GoToReferenceCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
namespace Sitecore.DataExchange.Gutters.Commands | ||
{ | ||
using System; | ||
using Shell.Framework.Commands; | ||
using System; | ||
using Sitecore.Shell.Framework; | ||
using Sitecore.Shell.Framework.Commands; | ||
using Sitecore.Text; | ||
|
||
namespace Sitecore.DataExchange.Gutters.Commands | ||
{ | ||
[Serializable] | ||
public class GoToReferenceCommand : Command | ||
{ | ||
public override void Execute(CommandContext context) | ||
{ | ||
var item = context.Items[0]; | ||
string id = context.Parameters["id"]; | ||
var id = context.Parameters["id"]; | ||
|
||
//Sitecore.Context.ClientPage.ClientResponse.Timer(string.Format("item:load(id={0})", id), 100); | ||
Sitecore.Text.UrlString parameters = new Sitecore.Text.UrlString(); | ||
var parameters = new UrlString(); | ||
parameters.Add("id", id); | ||
parameters.Add("fo", id); | ||
Sitecore.Shell.Framework.Windows.RunApplication("Content Editor", parameters.ToString()); | ||
Windows.RunApplication("Content Editor", parameters.ToString()); | ||
} | ||
} | ||
} |
18 changes: 9 additions & 9 deletions
18
Sitecore.DataExchange.Gutters/Commands/PipelineBatchContextMenuCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
Sitecore.DataExchange.Gutters/Commands/PipelineStepContextMenuCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.