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
25 changes: 17 additions & 8 deletions src/Spe/sitecore modules/PowerShell/Scripts/ise.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
var debugMarkers = [];
var resultsBottomOffset = 10;
var typingTimer;
var resultsVisibilityIntent = true;

var editor = $($("#Editor")[0]);
editor.hide();
Expand Down Expand Up @@ -465,6 +466,9 @@
spe.preventCloseWhenRunning(false);
}
clearVariablesCache();
if(!resultsVisibilityIntent){
setTimeout(spe.closeResults, 2000);
}
};

spe.clearBreakpoints = function() {
Expand Down Expand Up @@ -510,7 +514,6 @@
$("#Result").height(resultsHeight);
$("#Result").width($(window).width() - $("#Result").offset().left * 2);
$("#ProgressOverlay").css("top",($("#Result").offset().top+4)+"px");
$("#ResultsClose").css("top", ($("#Result").offset().top + 4) + "px");
};

function isEmpty(val) {
Expand All @@ -536,14 +539,16 @@
spe.restoreResults = function() {
$("#ResultsSplitter").show();
$("#ResultsRow").show();
codeeditor.resize();
spe.resizeEditor();
$("#ResultsStatusBarAction").removeClass("status-bar-results-hidden")
};

spe.closeResults = function() {
$("#ResultsSplitter").hide();
$("#ResultsRow").hide("slow", function() {
codeeditor.resize();
});
$("#ResultsStatusBarAction").addClass("status-bar-results-hidden")
};

function getCachedVariableValue(storageKey, variableName) {
Expand Down Expand Up @@ -677,13 +682,17 @@

});

$("#ResultsClose").click(function() {
$("#ResultsSplitter").hide();
$("#ResultsRow").hide("slow", function() {
codeeditor.resize(); /* do something cool here? */
});

$("#ShowHideResults").click(function() {
if ($("#ResultsRow").is(":visible")) {
resultsVisibilityIntent = false;
spe.closeResults();
} else {
resultsVisibilityIntent = true;
spe.restoreResults();
}
});

function _getCommandHelp(str) {
getPowerShellResponse({ "guid": guid, "command": str }, "GetHelpForCommand",
function(json) {
Expand Down
16 changes: 6 additions & 10 deletions src/Spe/sitecore modules/PowerShell/Styles/ise.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ a.ps-link {
text-transform: uppercase;
}

#HelpClose, #ResultsClose {
#HelpClose {
-moz-border-radius-bottomleft: 9px;
-moz-border-radius-bottomright: 9px;
-moz-border-radius-topleft: 9px;
Expand Down Expand Up @@ -183,25 +183,17 @@ a.ps-link {
top: 0;
}

#HelpClose:hover, #ResultsClose:hover {
#HelpClose:hover {
background: -moz-linear-gradient(center top, #dfdfdf 5%, #ededed 100%);
background-color: #e3e3e3;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
}

#ResultsClose:active {
top: 1px;
}

#ResultsSplitter {
background: url(/sitecore%20modules/PowerShell/Assets/Splitter.png) no-repeat center;
padding: 0 4px 0 4px;
}

#ResultsClose {
position: fixed;
}

#Result {
position: fixed;
bottom: 27px;
Expand Down Expand Up @@ -421,4 +413,8 @@ a.ps-link {

#CodeEditor * {
font-family: inherit !important;
}

#ResultsStatusBarAction.status-bar-results-hidden {
background-color: rgb(1, 36, 86);
}
5 changes: 4 additions & 1 deletion src/Spe/sitecore modules/Shell/PowerShell/PowerShellIse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
</p>
</Border>
</Border>
<Border ID="ResultsClose">x</Border>
<Border ID="ScriptResult" class="console">
<pre ID="ScriptResultCode"></pre>
</Border>
Expand All @@ -123,6 +122,10 @@
<Image ID="CopyResultsToClipboard" src="/~/icon/office/16x16/element_copy.png"
Alt="Copy results to clipboard" Title="Copy results to clipboard" />
</Border>
<Border ID="ResultsStatusBarAction" class="status-bar-panel status-bar-right-icon">
<Image ID="ShowHideResults" src="/~/icon/office/16x16/text_align_left.png"
Alt="Show/Hide Execution results pane" Title="Show/Hide Execution results pane" />
</Border>
<Border class="status-bar-panel status-bar-text">
<Image ID="RefreshHint" src="/~/icon/office/16x16/nav_refresh.png"
Alt="Show next usability hint..." Title="Show next usability hint..." />
Expand Down