aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Luong2013-06-20 16:09:34 (EDT)
committerMark Macdonald2013-06-20 16:15:05 (EDT)
commitd9a92754adae091a92307b51f8d3419f830f9fd1 (patch)
treea92950316f58b12bc7f2831569fb83c28c70668b
parent57f9c6bdb911b95ecd2341b080ecdc9bac18738e (diff)
downloadorg.eclipse.orion.client-d9a92754adae091a92307b51f8d3419f830f9fd1.zip
org.eclipse.orion.client-d9a92754adae091a92307b51f8d3419f830f9fd1.tar.gz
org.eclipse.orion.client-d9a92754adae091a92307b51f8d3419f830f9fd1.tar.bz2
Bug 411134 - [navigator] Navigator page missing go up buttonv20130620-2015
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/navigate/table.js13
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/banner/toolbar.html1
2 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
index 68dfa77..2012c09 100644
--- a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
+++ b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
@@ -106,7 +106,7 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
// new file and new folder in the nav bar (in a group)
commandRegistry.registerCommandContribution("pageActions", "eclipse.newFile", 1, "orion.new"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageActions", "eclipse.newFolder", 2, "orion.new", false, null, new mCommandRegistry.URLBinding("newFolder", "name")); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.registerCommandContribution("pageActions", "eclipse.upFolder", 3, null, true, new KeyBinding.KeyBinding(38, false, false, true)); //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.registerCommandContribution("navActions", "eclipse.upFolder", 3, null, false, new KeyBinding.KeyBinding(38, false, false, true)); //$NON-NLS-1$ //$NON-NLS-0$
// new project creation in the toolbar (in a group)
commandRegistry.registerCommandContribution("pageActions", "orion.new.project", 1, "orion.new"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageActions", "orion.new.linkProject", 2, "orion.new"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -136,7 +136,16 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
// If no selection, we have to build against the treeRoot
// This should be in the file explorer.
mFileCommands.updateNavTools(serviceRegistry, commandRegistry, explorer, "pageActions", "selectionTools", explorer.treeRoot, true); //$NON-NLS-1$ //$NON-NLS-0$
- explorer.updateCommands();
+ explorer.updateCommands();
+ explorer.addEventListener("rootChanged", function(event) {
+ var folderNavToolbar = lib.node("navActions");
+ if (folderNavToolbar) {
+ commandRegistry.destroy(folderNavToolbar);
+ commandRegistry.renderCommands(folderNavToolbar.id, folderNavToolbar, event.root, null, "tool"); //$NON-NLS-0$
+ } else {
+ throw new Error("could not find toolbar navActions"); //$NON-NLS-0$
+ }
+ });
// Must happen after the above call, so that all the open with commands are registered when we create our navigation links.
new mNavOutliner.NavigationOutliner({parent: "fileSystems", commandService: commandRegistry, serviceRegistry: serviceRegistry}); //$NON-NLS-0$
});
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/banner/toolbar.html b/bundles/org.eclipse.orion.client.ui/web/orion/banner/toolbar.html
index ec91efd..a4c010b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/banner/toolbar.html
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/banner/toolbar.html
@@ -1,5 +1,6 @@
<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>
<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>
+<ul class="layoutLeft commandList pageActions" id="navActions"></ul>
<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility:hidden;">
</div>
<div class="layoutRight" style="padding-left:7px;margin-left:4px;margin-top:6px;" id="settingsTab" style="visibility:hidden;">