summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorGabriel Luong2013-06-14 00:23:13 (EDT)
committer skaegi2013-06-18 13:37:15 (EDT)
commitaab674a658fc9251fa911d02dc45af18a1f61cff (patch)
tree3badda1dd4fd99912310dfa42672d98caf129f8c
parent3c8e60f443610dcdeffbf49fc3ce85dd78fc2d1b (diff)
downloadorg.eclipse.orion.client-aab674a658fc9251fa911d02dc45af18a1f61cff.zip
org.eclipse.orion.client-aab674a658fc9251fa911d02dc45af18a1f61cff.tar.gz
org.eclipse.orion.client-aab674a658fc9251fa911d02dc45af18a1f61cff.tar.bz2
Bug 410776 - Fix duplicate rendering of status and refactor rendering of status in working directory node.v20130618-1737
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js18
1 files changed, 8 insertions, 10 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
index e3634a0..db9fb01 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
@@ -530,9 +530,13 @@ exports.GitRepositoryExplorer = (function() {
};
GitRepositoryExplorer.prototype.renderStatus = function(repository, status){
+ var workingDirectoryNode = lib.node("workingDirectoryNode");
+ if (workingDirectoryNode) {
+ lib.empty(workingDirectoryNode);
+ }
var sectionItem = document.createElement("div");
sectionItem.className = "sectionTableItem";
- lib.node("workingDirectoryNode").appendChild(sectionItem);
+ workingDirectoryNode.appendChild(sectionItem);
var horizontalBox = document.createElement("div");
horizontalBox.style.overflow = "hidden";
@@ -550,22 +554,16 @@ exports.GitRepositoryExplorer = (function() {
horizontalBox.appendChild(detailsView);
if (status.RepositoryState !== "SAFE"){
- var repositoryState = document.createElement("span");
+ var repositoryState = document.createElement("div");
repositoryState.textContent = messages["Rebase in progress!"];
detailsView.appendChild(repositoryState);
-
- var div = document.createElement("div");
- detailsView.appendChild(div);
}
- var title = document.createElement("span");
+ var title = document.createElement("div");
title.textContent = workspaceState;
detailsView.appendChild(title);
- var div = document.createElement("div");
- detailsView.appendChild(div);
-
- var description = document.createElement("span");
+ var description = document.createElement("div");
description.textContent = i18nUtil.formatMessage(messages['${0} file(s) to stage and ${1} file(s) to commit.'], unstaged, staged);
detailsView.appendChild(description);
};