diff --git a/editor/js/ui/common/stack.js b/editor/js/ui/common/stack.js index b35131634..5b28eccd9 100644 --- a/editor/js/ui/common/stack.js +++ b/editor/js/ui/common/stack.js @@ -22,11 +22,17 @@ RED.stack = (function() { var entries = []; var visible = true; + // TODO: make this a singleton function - and watch out for stacks no longer + // in the DOM var resizeStack = function() { if (entries.length > 0) { - var headerHeight = entries[0].header.outerHeight(); + var headerHeight = 0; + entries.forEach(function(entry) { + headerHeight += entry.header.outerHeight(); + }); + var height = container.innerHeight(); - contentHeight = height - entries.length*headerHeight - (entries.length-1); + contentHeight = height - headerHeight - (entries.length-1); entries.forEach(function(e) { e.contentWrap.height(contentHeight); }); diff --git a/editor/js/ui/tab-versionControl.js b/editor/js/ui/tab-versionControl.js index a124f167b..afbeab488 100644 --- a/editor/js/ui/tab-versionControl.js +++ b/editor/js/ui/tab-versionControl.js @@ -37,11 +37,18 @@ RED.sidebar.versionControl = (function() { function createChangeEntry(row, entry, status, unstaged) { row.addClass("sidebar-version-control-change-entry"); var container = $('
').appendTo(row); + if (entry.label) { + row.addClass('node-info-none'); + container.text(entry.label); + return; + } + + var icon = $('').appendTo(container); var label = $('').appendTo(container); var bg = $('
').appendTo(row); - $('') + var viewDiffButton = $('') .appendTo(bg) .click(function(evt) { evt.preventDefault(); @@ -131,6 +138,12 @@ RED.sidebar.versionControl = (function() { entry.spinner.remove(); delete entry.spinner; } + + viewDiffButton.attr("disabled",(status === 'D' || status === '?')); + viewDiffButton.find("i") + .toggleClass('fa-eye',!(status === 'D' || status === '?')) + .toggleClass('fa-eye-slash',(status === 'D' || status === '?')) + } entry["update"+(unstaged?"Unstaged":"Staged")](entry, status); } @@ -156,7 +169,7 @@ RED.sidebar.versionControl = (function() { localChanges.content.css({height:"100%"}); var bg = $('
').appendTo(localChanges.header); - $('') + $('') .appendTo(bg) .click(function(evt) { evt.preventDefault(); @@ -208,6 +221,7 @@ RED.sidebar.versionControl = (function() { submitCommitButton.attr("disabled",true); unstagedContent.css("height","30px"); stagedContent.css("height","calc(100% - 30px - 175px)"); + commitBox.show(); commitBox.css("height","175px"); stageAllButton.attr("disabled",true); unstageAllButton.attr("disabled",true); @@ -239,7 +253,7 @@ RED.sidebar.versionControl = (function() { } }) - commitBox = $('').appendTo(localChanges.content); + commitBox = $('').hide().appendTo(localChanges.content); var commitMessage = $('