Refactor commit tooltip dialog
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
index e8b3d7a..45e4ab1 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
@@ -20,13 +20,13 @@
 

 	CommitTooltipDialog.prototype = new popupdialog.PopupDialog();

 

-	CommitTooltipDialog.prototype.TEMPLATE = '<div id="parentPane" style="padding:10px; width:520px"></div>';

+	CommitTooltipDialog.prototype.TEMPLATE = '<div id="parentPane" style="padding:10px; width:520px"></div>'; //$NON-NLS-0$

 

 	CommitTooltipDialog.prototype._init = function(options) {

 		this.commit = options.commit;

 

 		// Start the dialog initialization.

-		this._initialize(options.triggerNode, null, null, "mouseover", 1000);

+		this._initialize(options.triggerNode, null, null, "mouseover", 1000); //$NON-NLS-0$

 	};

 

 	CommitTooltipDialog.prototype._bindToDom = function(parent) {

@@ -37,64 +37,45 @@
 		var tableNode = this.$parentPane;

 

 		var commitMessage0 = commit.Message.split(/(\r?\n|$)/)[0];

-		var link = document.createElement("a");

-		link.className = "navlinkonpage";

-		link.href = require.toUrl("git/git-commit.html#") + commit.Location + "?page=1&pageSize=1";

+		var link = document.createElement("a"); //$NON-NLS-0$

+		link.className = "navlinkonpage"; //$NON-NLS-0$

+		link.href = require.toUrl("git/git-commit.html#") + commit.Location + "?page=1&pageSize=1"; //$NON-NLS-1$ //$NON-NLS-0$

 		link.textContent = commitMessage0;

 		tableNode.appendChild(link);

 		

-		var div = document.createElement("div");

-		div.style.paddingTop = "15px";

-		tableNode.appendChild(div);

-		

-		var imageDiv = document.createElement("div");

-		tableNode.appendChild(imageDiv);

-		

-		var textDiv = document.createElement("div");

+		var textDiv = document.createElement("div"); //$NON-NLS-0$

+		textDiv.style.paddingTop = "15px"; //$NON-NLS-0$

 		tableNode.appendChild(textDiv);

-

+		

 		if (commit.AuthorImage) {

-			var authorImage = document.createElement("div");

-			authorImage.style['float'] = "left";

 			var image = new Image();

 			image.src = commit.AuthorImage;

 			image.name = commit.AuthorName;

-			image.className = "git-author-icon";

-			authorImage.appendChild(image);

-			imageDiv.appendChild(authorImage);

+			image.className = "git-author-icon"; //$NON-NLS-0$

+			textDiv.appendChild(image);

 		}

-

-		var authoredBySpan = document.createElement("span");

-		authoredBySpan.textContent = i18nUtil.formatMessage(messages[" authored by ${0} {${1}) on ${2}"], //$NON-NLS-0$

+		

+		var authoredByDiv = document.createElement("div"); //$NON-NLS-0$

+		authoredByDiv.textContent = i18nUtil.formatMessage(messages[" authored by ${0} {${1}) on ${2}"], //$NON-NLS-0$

 			commit.AuthorName, commit.AuthorEmail, new Date(commit.Time).toLocaleString()); 

-		textDiv.appendChild(authoredBySpan);

+		textDiv.appendChild(authoredByDiv);

 		

-		var div = document.createElement("div");

-		textDiv.appendChild(div);

-		

-		var committedBySpan = document.createElement("span");

-		committedBySpan.textContent = i18nUtil.formatMessage(messages['committed by 0 (1)'], commit.CommitterName, commit.CommitterEmail);

-		textDiv.appendChild(committedBySpan);

+		var committedByDiv = document.createElement("div"); //$NON-NLS-0$

+		committedByDiv.textContent = i18nUtil.formatMessage(messages['committed by 0 (1)'], commit.CommitterName, commit.CommitterEmail); //$NON-NLS-0$

+		textDiv.appendChild(committedByDiv);

 

-		var div = document.createElement("div");

-		div.style.paddingTop = "15px";

-		textDiv.appendChild(div);

-		

-		var commitNameSpan = document.createElement("span");

-		commitNameSpan.textContent = messages["commit:"] + commit.Name;

-		textDiv.appendChild(commitNameSpan);

-

+		var commitNameDiv = document.createElement("div"); //$NON-NLS-0$

+		commitNameDiv.style.paddingTop = "15px"; //$NON-NLS-0$

+		commitNameDiv.textContent = messages["commit:"] + commit.Name; //$NON-NLS-0$

+		textDiv.appendChild(commitNameDiv);

 

 		if (commit.Parents && commit.Parents.length > 0) {

-			var div = document.createElement("div");

-			textDiv.appendChild(div);

-

-			var parentNode = document.createElement("span");

-			parentNode.textContent = messages["parent:"];

+			var parentNode = document.createElement("div"); //$NON-NLS-0$

+			parentNode.textContent = messages["parent:"]; //$NON-NLS-0$

 			

 			var parentLink = document.createElement("a");

-			parentLink.className = "navlinkonpage";

-			parentLink.href = require.toUrl("git/git-commit.html#") + commit.Parents[0].Location + "?page=1&pageSize=1";

+			parentLink.className = "navlinkonpage"; //$NON-NLS-0$

+			parentLink.href = require.toUrl("git/git-commit.html#") + commit.Parents[0].Location + "?page=1&pageSize=1"; //$NON-NLS-1$ //$NON-NLS-0$

 			parentLink.textContent = commit.Parents[0].Name;

 			parentNode.appendChild(parentLink);

 			

@@ -105,46 +86,40 @@
 		var displayTags = commit.Tags && commit.Tags.length > 0;

 

 		if (displayBranches) {

-			var div = document.createElement("div");

-			div.style.paddingTop = "15px";

-			textDiv.appendChild(div);

-			

-			var branchesSection = document.createElement("section");

+			var branchesSection = document.createElement("section"); //$NON-NLS-0$

+			branchesSection.style.paddingTop = "15px"; //$NON-NLS-0$

+			branchesSection.textContent = messages["branches: "]; //$NON-NLS-0$

 			textDiv.appendChild(branchesSection);

 			

-			var branchesNode = document.createElement("span");

-			branchesNode.textContent = messages["branches: "];

-			branchesSection.appendChild(branchesNode);

-

-			var branchesList = document.createElement("div");

+			var branchesList = document.createElement("div"); //$NON-NLS-0$

 			branchesSection.appendChild(branchesList);

 

-			for ( var i = 0; i < commit.Branches.length; ++i) {

-				var branchNameSpan = document.createElement("span");

-				branchNameSpan.style.paddingLeft = "10px";

+			for (var i = 0; i < commit.Branches.length; ++i) {

+				var branchNameSpan = document.createElement("span"); //$NON-NLS-0$

+				branchNameSpan.style.paddingLeft = "10px"; //$NON-NLS-0$

 				branchNameSpan.textContent = commit.Branches[i].FullName;

 				branchesList.appendChild(branchNameSpan);

 			}

 		}

 

 		if (displayTags) {

-			var div = document.createElement("div");

-			div.style.paddingTop = "15px";

+			var div = document.createElement("div"); //$NON-NLS-0$

+			div.style.paddingTop = "15px"; //$NON-NLS-0$

 			textDiv.appendChild(div);

 			

-			var tagsSection = document.createElement("section");

+			var tagsSection = document.createElement("section"); //$NON-NLS-0$

 			textDiv.appendChild(tagsSection);

 			

-			var tagsNode = document.createElement("span");

-			tagsNode.textContent = messages["tags: "];

+			var tagsNode = document.createElement("span"); //$NON-NLS-0$

+			tagsNode.textContent = messages["tags: "]; //$NON-NLS-0$

 			tagsSection.appendChild(tagsNode);

 			

-			var tagsList = document.createElement("div");

+			var tagsList = document.createElement("div"); //$NON-NLS-0$

 			tagsSection.appendChild(tagsList);

 

-			for ( var i = 0; i < commit.Tags.length; ++i) {

-				var tagNameSpan = document.createElement("span");

-				tagNameSpan.style.paddingLeft = "10px";

+			for (var i = 0; i < commit.Tags.length; ++i) {

+				var tagNameSpan = document.createElement("span"); //$NON-NLS-0$

+				tagNameSpan.style.paddingLeft = "10px"; //$NON-NLS-0$

 				tagNameSpan.textContent = commit.Tags[i].Name;

 				tagsList.appendChild(tagNameSpan);

 			}

diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
index fcaa916..45aed68 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
@@ -159,15 +159,15 @@
 		var that = this;
 		
 		var tableNode = document.createElement("div"); //$NON-NLS-0$
-		tableNode.style.padding = "10px";
-		tableNode.style.maxWidth = "480px";
+		tableNode.style.padding = "10px"; //$NON-NLS-0$
+		tableNode.style.maxWidth = "480px"; //$NON-NLS-0$
 		lib.empty(parentNode);
 		parentNode.appendChild(tableNode);
 
 		var commitMessage0 = commit.Message.split(/(\r?\n|$)/)[0];
 		var link = document.createElement("a");
-		link.className = "navlinkonpage";
-		link.href = require.toUrl("git/git-commit.html#") + commit.Location + "?page=1&pageSize=1";
+		link.className = "navlinkonpage"; //$NON-NLS-0$
+		link.href = require.toUrl("git/git-commit.html#") + commit.Location + "?page=1&pageSize=1"; //$NON-NLS-1$ //$NON-NLS-0$
 		link.textContent = commitMessage0;
 		tableNode.appendChild(link);
 		
@@ -183,57 +183,38 @@
 			}
 		}, false);
 		
-		var div = document.createElement("div");
-		div.style.paddingTop = "15px";
-		tableNode.appendChild(div);
-		
-		var imageDiv = document.createElement("div");
-		tableNode.appendChild(imageDiv);
-		
-		var textDiv = document.createElement("div");
+		var textDiv = document.createElement("div"); //$NON-NLS-0$
+		textDiv.style.paddingTop = "15px"; //$NON-NLS-0$
 		tableNode.appendChild(textDiv);
-
+		
 		if (commit.AuthorImage) {
-			var authorImage = document.createElement("div");
-			authorImage.style['float'] = "left";
 			var image = new Image();
 			image.src = commit.AuthorImage;
 			image.name = commit.AuthorName;
-			image.className = "git-author-icon";
-			authorImage.appendChild(image);
-			imageDiv.appendChild(authorImage);
+			image.className = "git-author-icon"; //$NON-NLS-0$
+			textDiv.appendChild(image);
 		}
-
-		var authoredBySpan = document.createElement("span");
-		authoredBySpan.textContent = i18nUtil.formatMessage(messages[" authored by ${0} {${1}) on ${2}"], //$NON-NLS-0$
+		
+		var authoredByDiv = document.createElement("div"); //$NON-NLS-0$
+		authoredByDiv.textContent = i18nUtil.formatMessage(messages[" authored by ${0} {${1}) on ${2}"], //$NON-NLS-0$
 			commit.AuthorName, commit.AuthorEmail, new Date(commit.Time).toLocaleString()); 
-		textDiv.appendChild(authoredBySpan);
+		textDiv.appendChild(authoredByDiv);
 		
-		var div = document.createElement("div");
-		textDiv.appendChild(div);
-		
-		var committedBySpan = document.createElement("span");
-		committedBySpan.textContent = i18nUtil.formatMessage(messages['committed by 0 (1)'], commit.CommitterName, commit.CommitterEmail);
-		textDiv.appendChild(committedBySpan);
+		var committedByDiv = document.createElement("div"); //$NON-NLS-0$
+		committedByDiv.textContent = i18nUtil.formatMessage(messages['committed by 0 (1)'], commit.CommitterName, commit.CommitterEmail); //$NON-NLS-0$
+		textDiv.appendChild(committedByDiv);
 
-		var div = document.createElement("div");
-		div.style.paddingTop = "15px";
-		textDiv.appendChild(div);
-		
-		var commitNameSpan = document.createElement("span");
-		commitNameSpan.textContent = messages["commit:"] + commit.Name;
-		textDiv.appendChild(commitNameSpan);
-
+		var commitNameDiv = document.createElement("div"); //$NON-NLS-0$
+		commitNameDiv.style.paddingTop = "15px"; //$NON-NLS-0$
+		commitNameDiv.textContent = messages["commit:"] + commit.Name; //$NON-NLS-0$
+		textDiv.appendChild(commitNameDiv);
 
 		if (commit.Parents && commit.Parents.length > 0) {
-			var div = document.createElement("div");
-			textDiv.appendChild(div);
-
-			var parentNode = document.createElement("span");
-			parentNode.textContent = messages["parent:"];
+			var parentNode = document.createElement("div"); //$NON-NLS-0$
+			parentNode.textContent = messages["parent:"]; //$NON-NLS-0$
 			
 			var parentLink = document.createElement("a");
-			parentLink.className = "navlinkonpage";
+			parentLink.className = "navlinkonpage"; //$NON-NLS-0$
 			parentLink.href = require.toUrl("git/git-commit.html#") + commit.Parents[0].Location + "?page=1&pageSize=1";
 			parentLink.textContent = commit.Parents[0].Name;
 			parentNode.appendChild(parentLink);