Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 274 additions & 65 deletions src/Spe/Client/Applications/PowerShellIse.cs

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/Spe/Core/Settings/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class ApplicationSettings
private const string LastScriptSettingFieldName = "LastScript";
private const string SaveLastScriptSettingFieldName = "SaveLastScript";
private const string LiveAutocompletionSettingFieldName = "LiveAutocompletion";
private const string PerTabOutputSettingFieldName = "PerTabOutput";
private const string HostWidthSettingFieldName = "HostWidth";
private const string ForegroundColorSettingFieldName = "ForegroundColor";
private const string BackgroundColorSettingFieldName = "BackgroundColor";
Expand Down Expand Up @@ -105,6 +106,7 @@ public string FontFamilyStyle
}

public bool LiveAutocompletion { get; set; }
public bool PerTabOutput { get; set; }

private string AppSettingsPath => SettingsItemPath + ApplicationName + "/";
private string CurrentUserSettingsPath => AppSettingsPath + CurrentDomain + "/" + CurrentUserName;
Expand Down Expand Up @@ -229,7 +231,8 @@ public void Save()
{
configuration[LastScriptSettingFieldName] = HttpUtility.HtmlEncode(LastScript);
((CheckboxField) configuration.Fields[SaveLastScriptSettingFieldName]).Checked = SaveLastScript;
((CheckboxField)configuration.Fields[LiveAutocompletionSettingFieldName]).Checked = LiveAutocompletion;
((CheckboxField)configuration.Fields[LiveAutocompletionSettingFieldName]).Checked = LiveAutocompletion;
((CheckboxField)configuration.Fields[PerTabOutputSettingFieldName]).Checked = PerTabOutput;
configuration[HostWidthSettingFieldName] = HostWidth.ToString(CultureInfo.InvariantCulture);
configuration[ForegroundColorSettingFieldName] = ForegroundColor.ToString();
configuration[BackgroundColorSettingFieldName] = BackgroundColor.ToString();
Expand Down Expand Up @@ -257,6 +260,9 @@ internal void Load()
LiveAutocompletion =
TryGetSettingValue(LiveAutocompletionSettingFieldName, false,
() => ((CheckboxField) configuration.Fields[LiveAutocompletionSettingFieldName]).Checked);
PerTabOutput =
TryGetSettingValue(PerTabOutputSettingFieldName, false,
() => ((CheckboxField) configuration.Fields[PerTabOutputSettingFieldName]).Checked);
HostWidth =
TryGetSettingValue(HostWidthSettingFieldName,150,
() => int.TryParse(configuration[HostWidthSettingFieldName], out var hostWidth) ? hostWidth : 150);
Expand Down Expand Up @@ -297,6 +303,7 @@ private void SetToDefault()
LastScript = string.Empty;
SaveLastScript = true;
LiveAutocompletion = false;
PerTabOutput = false;
HostWidth = 150;
ForegroundColor = ConsoleColor.White;
BackgroundColor = ConsoleColor.DarkBlue;
Expand Down
3 changes: 2 additions & 1 deletion src/Spe/Texts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class Texts
public const string PowerShellIse_JobExecuteScript_Working = "Working";
public const string PowerShellIse_LoadItem_The_item_is_not_a_script_ = "The item is not a script.";
public const string PowerShellIse_Open_Open_Script = "Open Script";

public const string PowerShellIse_The_script_is_modified_Do_you_want_to_close_it_without_saving_the_changes = "The script is modified. Do you want to close it without saving the changes?";

public const string PowerShellIse_Open_Select_the_script_item_that_you_want_to_open_ =
"Select the script item that you want to open.";

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
818 changes: 503 additions & 315 deletions src/Spe/sitecore modules/PowerShell/Scripts/ise.js

Large diffs are not rendered by default.

70 changes: 64 additions & 6 deletions src/Spe/sitecore modules/PowerShell/Styles/ise.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
background-color: white;
}

#ResultsSplitter + tr > td { height: 100%; }
#ResultsSplitter + tr > td {
height: 100%;
overflow: auto;
}

#Databases {
border: solid 1px ButtonShadow;
Expand Down Expand Up @@ -194,10 +197,10 @@ a.ps-link {
padding: 0 4px 0 4px;
}

#Result {
position: fixed;
bottom: 27px;
}
/*#Result {*/
/* position: fixed;*/
/* bottom: 27px;*/
/*}*/

#HelpClose {
font-size: 18px;
Expand Down Expand Up @@ -417,4 +420,59 @@ a.ps-link {

#ResultsStatusBarAction.status-bar-results-hidden {
background-color: rgb(1, 36, 86);
}
}

.scTabPage {
padding: 4px 0 0 0;
}

.scTab, .scTab_Hover, .scTabActive, .scTabActive_Hover {
text-transform: none;
line-height: 30px;
}

.scTabActive:after, .scTabActive_Hover:after {
height: 30px;
}

.ff .scTabstrip {
margin-top: 4px;
height: 33px;
}

.scTabs {
top: 30px;
display:none;
}

.aceCodeEditor, #EditingArea, #Content, #Wrapper, #Result {
width: 100%;
height: 100%;
}

#TabsPanel {
width: 100%;
height: 35px;
}

#EditingArea {
overflow: auto;
}

#CodeEditors {
width: 100%;
height: calc(100% - 40px);
}

.scriptModified{
display:none;
color:#fc2929
}

.closeTab {
display: inline-block;
cursor: pointer;
background: url(/sitecore%20modules/PowerShell/Assets/TabClose.png) no-repeat center;
padding: 0 4px 0 4px;
margin: 0 -10px 0 10px;
}
32 changes: 17 additions & 15 deletions src/Spe/sitecore modules/Shell/PowerShell/PowerShellIse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<PowerShellIse>
<FormPage Application="PowerShell/PowerShellIse">
<CodeBeside Type="Spe.Client.Applications.PowerShellIse,Spe" />

<CodeBeside Type="Spe.Client.Applications.PowerShellIse,Spe" />

<Favicon Src="/sitecore/images/favicon.ico" />
<Stylesheet runat="server" Src="Content Manager.css" DeviceDependant="true" />
<Stylesheet runat="server" Src="Ribbon.css" DeviceDependant="true" />
<Stylesheet runat="server" Src="/sitecore modules/PowerShell/Styles/jquery-ui.min.css" DeviceDependant="true" />
<Stylesheet runat="server" Src="/sitecore modules/PowerShell/Styles/Dialogs.css" DeviceDependant="true" />
<Stylesheet runat="server" Src="/sitecore modules/PowerShell/Styles/Console.css" DeviceDependant="true" />
<Stylesheet runat="server" Src="/sitecore modules/PowerShell/Styles/ise.css" DeviceDependant="true" />

<Script src="/sitecore modules/PowerShell/Scripts/jquery.min.js"></Script>
<Script>$ise = jQuery.noConflict();</Script>
<script type="text/javascript">if (!window.$sc) $sc = jQuery.noConflict();</script>
Expand All @@ -32,11 +32,14 @@

<input type="hidden" id="scActiveRibbonStrip" name="scActiveRibbonStrip" />
<Memo ID="SelectionText" Style="display:none;"/>
<Memo ID="SelectionRange" Style="display:none;"/>
<Memo ID="Breakpoints" Style="display:none;"/>
<Memo ID="Editor" Value="Get-ChildItem *" Style="display:none;"/>
<Memo ID="OpenedScripts" Style="display:none;"/>
<Memo ID="ScriptItemIdMemo" Style="display:none;"/>
<Memo ID="ScriptItemDbMemo" Style="display:none;"/>

<DataContext ID="DataContext" Root="/sitecore" DataViewName="Master" />
<GridPanel ID="Wrapper" Width="100%" Height="100%" CellPadding="0" GridPanel.Height="100%" Background="#e9e9e9" class="spe-secured-app">
<GridPanel ID="Wrapper" CellPadding="0" GridPanel.Height="100%" Background="#e9e9e9" class="spe-secured-app">
<Border ID="RibbonPanel"/>
<Border ID="InfoPanel" class="scEditorWarning" />
<Border ID="Warnings" style="display:none">
Expand Down Expand Up @@ -80,21 +83,20 @@
</Border>
</GridPanel>
</Border>
<GridPanel ID="Content" Width="100%" Height="100%" CellPadding="4" GridPanel.Height="100%">
<GridPanel ID="Content" CellPadding="4" GridPanel.Height="100%">
<GridPanel Columns="1" Width="100%" Height="100%" CellPadding="4">
<GridPanel Columns="1" Height="100%" GridPanel.Height="200px" Width="100%" GridPanel.ID="ScriptPane">
<GridPanel Width="100%" Columns="1" GridPanel.Width="100%" Height="100%" GridPanel.Height="100%">
<Memo ID="Editor" Width="100%" Height="100%" Wrap="off" Value="Get-ChildItem *" GridPanel.Height="1px"
GridPanel.Width="100%" class="console pre" GridPanel.Style="padding:0px" spellcheck="false" Visible="false" />
<Border ID="CodeEditor" Width="100%" Height="100%" Wrap="off" GridPanel.Height="100%"
GridPanel.Width="100%" />
</GridPanel>
</GridPanel>
<Border ID="EditingArea" GridPanel.Height="200px" GridPanel.ID="ScriptPane">
<Border ID="TabsPanel">
<Tabstrip ID="Tabs" class="scFlexContent">
</Tabstrip>
</Border>
<Border ID="CodeEditors" />
</Border>
<PsHSplitter ID="IDEXsltBottom" GridPanel.Height="2" Target="top" GridPanel.Row.ID="ResultsSplitter"
Height="10px" />
<GridPanel Columns="1" Height="100%" GridPanel.Height="100%" Width="100%" GridPanel.ID="ResultsPane"
GridPanel.Row.ID="ResultsRow" GridPanel.Style="padding-bottom:2px">
<Border ID="Result" Height="100%" GridPanel.Height="100%" Width="100%" class="console pre results"
<Border ID="Result" GridPanel.Height="100%" class="console pre results"
GridPanel.Style="padding:0px">
<Border Id="ProgressOverlay" Visible="false">
<Border>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
ID: "08c36097-57d5-440d-ab36-0ed73e0cb11e"
Parent: "86d29da6-ffad-4f0e-a659-aae49f0e4a6b"
Template: "455a3e98-a627-4b40-8035-e683a0331ac7"
Path: /sitecore/templates/Modules/PowerShell Console/PowerShell Console Settings/Behaviour/PerTabOutput
DB: master
SharedFields:
- ID: "ab162cc0-dc80-4abf-8871-998ee5d7ba32"
Hint: Type
Value: Checkbox
- ID: "ba3f86a2-4a1c-4d78-b63d-91c2779c1b5e"
Hint: __Sortorder
Value: 500
Languages:
- Language: en
Fields:
- ID: "19a69332-a23e-4e70-8d16-b2640cb24cc8"
Hint: Title
Value: Separate output per script tab
- ID: "9541e67d-ce8c-4225-803d-33f7f29f09ef"
Hint: __Short description
Value: Only valid in ISE
Versions:
- Version: 1
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20240508T164719Z
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\Admin
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "06f92fff-ad52-473a-835d-01976a02eb94"
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SharedFields:
Value: 200
- ID: "cf738220-908d-4c3f-9482-32e625daf13c"
Hint: Fields
Value: FontSize|FontFamily|HostWidth|ForegroundColor|BackgroundColor|SaveLastScript|LiveAutocompletion
Value: FontSize|FontFamily|HostWidth|ForegroundColor|BackgroundColor|SaveLastScript|LiveAutocompletion|PerTabOutput
Languages:
- Language: da
Fields:
Expand Down Expand Up @@ -46,14 +46,14 @@ Languages:
Fields:
- ID: "25bed78c-4957-4165-998a-ca1b52f67497"
Hint: __Created
Value: 20090528T094300
Value: 20090528T074300Z
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f"
Hint: __Created by
Value: |
sitecore\admin
- ID: "8cdc337e-a112-42fb-bbb4-4143751e123f"
Hint: __Revision
Value: "5e8783c0-22a5-4016-8fc7-bb89272a6485"
Value: "76e07e71-259f-4afe-8ba4-bce99247a128"
- Language: "ja-JP"
Fields:
- ID: "108d3a63-baaa-4560-86d8-3a112ed84717"
Expand Down