aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Luong2013-06-11 22:08:39 (EDT)
committerSzymon Brandys2013-06-12 07:18:28 (EDT)
commit02afdf6c73b909f176c8268604cbb1a971e41b46 (patch)
treeba322d7c8feea6bf8e3eb170cd4bed8acd057f14
parente0e503820240aa163fbf8d766e04127d0563998f (diff)
downloadorg.eclipse.orion.client-02afdf6c73b909f176c8268604cbb1a971e41b46.zip
org.eclipse.orion.client-02afdf6c73b909f176c8268604cbb1a971e41b46.tar.gz
org.eclipse.orion.client-02afdf6c73b909f176c8268604cbb1a971e41b46.tar.bz2
Bug 410546 cont - Added tooltips to the file sprites in git commit explorer.
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/nls/root/gitmessages.js4
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js23
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js4
3 files changed, 23 insertions, 8 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/git/nls/root/gitmessages.js b/bundles/org.eclipse.orion.client.git/web/git/nls/root/gitmessages.js
index 03db5ef..b1aabe1 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/nls/root/gitmessages.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/nls/root/gitmessages.js
@@ -58,7 +58,9 @@ define({
"Unstaged change": "Unstaged change",
"Staged change": "Staged change",
"Unstaged add": "Unstaged add",
- "Staged add": "Staged add",
+ "Staged add": "Staged add",
+ "Addition": "Addition",
+ "Deletion": "Deletion",
"Resolve Conflict": "Resolve Conflict",
"Conflicting": "Conflicting",
"Commit message": "Commit message",
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js
index a3a00b4..4a35f73 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * @license Copyright (c) 2011, 2012 IBM Corporation and others. All rights
+ * @license Copyright (c) 2011, 2013 IBM Corporation and others. All rights
* reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
@@ -13,8 +13,8 @@
define(
[ 'require', 'i18n!git/nls/gitmessages', 'orion/section', 'orion/explorers/explorer', 'orion/PageUtil', 'orion/i18nUtil', 'orion/webui/littlelib',
- 'orion/globalCommands', 'orion/git/gitCommands', 'orion/git/util', 'orion/Deferred' ],
- function(require, messages, mSection, mExplorer, PageUtil, i18nUtil, lib, mGlobalCommands, mGitCommands, mGitUtil, Deferred) {
+ 'orion/globalCommands', 'orion/git/gitCommands', 'orion/git/util', 'orion/Deferred', 'orion/webui/tooltip' ],
+ function(require, messages, mSection, mExplorer, PageUtil, i18nUtil, lib, mGlobalCommands, mGitCommands, mGitUtil, Deferred, Tooltip) {
var exports = {};
exports.GitCommitExplorer = (function() {
@@ -387,15 +387,28 @@ define(
var path = item.OldPath;
var sprite = "git-sprite-file"; //$NON-NLS-0$
+ var tooltip = messages["Diffs"]; //$NON-NLS-0$
if (item.ChangeType === "ADD") { //$NON-NLS-0$
path = item.NewPath;
sprite = "git-sprite-addition"; //$NON-NLS-0$
+ tooltip = messages["Addition"]; //$NON-NLS-0$
} else if (item.ChangeType === "DELETE") { //$NON-NLS-0$
sprite = "git-sprite-removal"; //$NON-NLS-0$
+ tooltip = messages["Deletion"]; //$NON-NLS-0$
}
- this.getExpandImage(tableRow, div, "gitImageSprite", sprite); //$NON-NLS-0$
-
+ this.getExpandImage(tableRow, div);
+
+ var icon = document.createElement("span"); //$NON-NLS-0$
+ icon.className = sprite;
+ icon.classList.add("gitImageSprite");
+ icon.commandTooltip = new Tooltip.Tooltip({
+ node: icon,
+ text: tooltip,
+ position: ["above", "below", "right", "left"] //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ });
+ div.appendChild(icon);
+
var itemLabel = document.createElement("span"); //$NON-NLS-0$
itemLabel.className = "gitMainDescription"; //$NON-NLS-0$
itemLabel.textContent = path;
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
index af446c9..aafddd0 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
@@ -414,7 +414,7 @@ define(['require', 'i18n!git/nls/gitmessages', 'orion/explorers/explorer', 'orio
div.className = "sectionTableItem"; //$NON-NLS-0$
td.appendChild(div);
- this.getExpandImage(tableRow, div); //$NON-NLS-0$
+ this.getExpandImage(tableRow, div);
var navGridHolder = this.explorer.getNavDict() ? this.explorer.getNavDict().getGridNavHolder(item, true) : null;
@@ -631,7 +631,7 @@ define(['require', 'i18n!git/nls/gitmessages', 'orion/explorers/explorer', 'orio
div.className = "sectionTableItem"; //$NON-NLS-0$
td.appendChild(div);
- this.getExpandImage(tableRow, div); //$NON-NLS-0$
+ this.getExpandImage(tableRow, div);
var navGridHolder = this.explorer.getNavDict() ? this.explorer.getNavDict().getGridNavHolder(item, true) : null;