aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Luong2013-06-03 11:17:35 (EDT)
committerMark Macdonald2013-06-03 16:44:22 (EDT)
commit565d28131347febfa000ef97f51c4ce40875dcf3 (patch)
treea21cadc73cc74a4f79739398cb36690bfb910232
parent2392c8aa787ce88611ba6d2fe0f39779e7988e35 (diff)
downloadorg.eclipse.orion.client-565d28131347febfa000ef97f51c4ce40875dcf3.zip
org.eclipse.orion.client-565d28131347febfa000ef97f51c4ce40875dcf3.tar.gz
org.eclipse.orion.client-565d28131347febfa000ef97f51c4ce40875dcf3.tar.bz2
Bug 409405 - Change the New and Action button in the navigator view to Sprite Buttons
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/navigate/table.js16
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js17
2 files changed, 19 insertions, 14 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 8f45089..24d67d8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
+++ b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
@@ -1,6 +1,6 @@
/*******************************************************************************
* @license
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 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 Distribution
@@ -40,7 +40,6 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
children:[]
};
-
var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
var explorer = new mExplorerTable.FileExplorer({
@@ -92,10 +91,11 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
mFileCommands.createFileCommands(serviceRegistry, commandRegistry, explorer, fileClient);
// define the command contributions - where things appear, first the groups
- commandRegistry.addCommandGroup("pageActions", "orion.new", 1000, messages["New"]); //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.addCommandGroup("pageActions", "orion.new", 1000, messages["New"], null, null, "core-sprite-add-content"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.addCommandGroup("pageActions", "eclipse.new", 1000, messages["New"], null, null, "core-sprite-add-content"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.addCommandGroup("pageActions", "orion.gitGroup", 200); //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.addCommandGroup("selectionTools", "orion.selectionGroup", 500, messages["Actions"], null, null); //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.addCommandGroup("selectionTools", "orion.importExportGroup", 100, null, "orion.selectionGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.addCommandGroup("selectionTools", "orion.selectionGroup", 500, messages["Actions"], null, null, "core-sprite-settings"); //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.addCommandGroup("selectionTools", "orion.importExportGroup", 100, null, "orion.selectionGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.addCommandGroup("selectionTools", "orion.newResources", 101, null, "orion.selectionGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
// commands that don't appear but have keybindings
commandRegistry.registerCommandContribution("pageActions", "eclipse.copySelections", 1, null, true, new KeyBinding.KeyBinding('c', true)); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -104,9 +104,9 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
// commands appearing in nav tool bar
commandRegistry.registerCommandContribution("pageActions", "eclipse.openResource", 500); //$NON-NLS-1$ //$NON-NLS-0$
- //new file and new folder in the nav bar do not label the group (we don't want a menu)
- commandRegistry.registerCommandContribution("pageActions", "eclipse.newFile", 1); //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.registerCommandContribution("pageActions", "eclipse.newFolder", 2, null, false, null, new mCommandRegistry.URLBinding("newFolder", "name")); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ // new file and new folder in the nav bar (in a group)
+ commandRegistry.registerCommandContribution("pageActions", "eclipse.newFile", 1, "eclipse.new"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.registerCommandContribution("pageActions", "eclipse.newFolder", 2, "eclipse.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$
// 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$
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
index 0b9b0d4..f022956 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
@@ -732,7 +732,9 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib',
},
visibleWhen: function(item) {
item = forceSingleItem(item);
- return item.Directory && !mFileUtils.isAtRoot(item.Location);}});
+ return item.Directory && !mFileUtils.isAtRoot(item.Location);
+ }
+ });
commandService.addCommand(newFileCommand);
var newFolderNameParameters = new mCommandRegistry.ParametersDescription([new mCommandRegistry.CommandParameter('name', 'text', messages['Folder name:'], messages['New Folder'])]); //$NON-NLS-1$ //$NON-NLS-0$
@@ -771,8 +773,9 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib',
},
visibleWhen: function(item) {
item = forceSingleItem(item);
- return item.Directory && !mFileUtils.isAtRoot(item.Location);}});
-
+ return item.Directory && !mFileUtils.isAtRoot(item.Location);
+ }
+ });
commandService.addCommand(newFolderCommand);
var zipURLParameters = new mCommandRegistry.ParametersDescription([new mCommandRegistry.CommandParameter('url', 'url', messages['File URL:'], 'URL'), new mCommandRegistry.CommandParameter('unzip', 'boolean', messages["Unzip *.zip files:"], true)]);//$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -800,7 +803,8 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib',
},
visibleWhen: function(item) {
item = forceSingleItem(item);
- return item.Directory && !mFileUtils.isAtRoot(item.Location);}
+ return item.Directory && !mFileUtils.isAtRoot(item.Location);
+ }
});
commandService.addCommand(importZipURLCommand);
@@ -856,7 +860,8 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib',
errorHandler(messages["The name and server location were not specified."]);
}
},
- visibleWhen: canCreateProject});
+ visibleWhen: canCreateProject
+ });
commandService.addCommand(linkProjectCommand);
var goUpCommand = new mCommands.Command({
@@ -969,7 +974,7 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/webui/littlelib',
return makeMoveCopyTargetChoices(items, userData, false);
},
visibleWhen: oneOrMoreFilesOrFolders
- });
+ });
commandService.addCommand(moveCommand);
var bufferedSelection = [];