aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Hunter2013-06-12 15:39:18 (EDT)
committerkwalker2013-06-12 16:07:45 (EDT)
commit65a82fe4a93af38b8b87862f8b85be97623b0d1c (patch)
treec4d9b16bf4e054a3f4ed1cef82045b31c4af0f0c
parent04c2d3c3da93d6671bbeb7bb6eda1f7093d9ece7 (diff)
downloadorg.eclipse.orion.client-65a82fe4a93af38b8b87862f8b85be97623b0d1c.zip
org.eclipse.orion.client-65a82fe4a93af38b8b87862f8b85be97623b0d1c.tar.gz
org.eclipse.orion.client-65a82fe4a93af38b8b87862f8b85be97623b0d1c.tar.bz2
Bug 390349 user list prev/next page commands should be on the right
-rw-r--r--bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js7
-rw-r--r--bundles/org.eclipse.orion.client.users/web/orion/profile/usersUtil.js13
-rw-r--r--bundles/org.eclipse.orion.client.users/web/profile/user-list.js8
3 files changed, 16 insertions, 12 deletions
diff --git a/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js b/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
index 5034c15..44418be 100644
--- a/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
+++ b/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
@@ -1,6 +1,6 @@
/*******************************************************************************
* @license
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -19,13 +19,14 @@ var eclipse = eclipse || {};
eclipse.UsersList = (function(){
- function UsersList(serviceRegistry, commandService, selection, searcher, parentId, toolbarId, selectionToolsId, actionScopeId) {
+ function UsersList(serviceRegistry, commandService, selection, searcher, parentId, toolbarId, pageNavId, selectionToolsId, actionScopeId) {
this.registry = serviceRegistry;
this.commandService = commandService;
this.selection = selection;
this.searcher = searcher;
this.parentId = parentId;
this.toolbarId = toolbarId;
+ this.pageNavId = pageNavId;
this.selectionToolsId = selectionToolsId;
this.actionScopeId = actionScopeId;
this.model = null;
@@ -80,7 +81,7 @@ eclipse.UsersList = (function(){
flatModel.queryObject = queryObj;
this.queryObject = queryObj;
this.createTree(this.parentId, flatModel, {setFocus: true}); //$NON-NLS-0$
- mUsersUtil.updateNavTools(this.registry, this.commandService, this, this.toolbarId, this.selectionToolsId, {});
+ mUsersUtil.updateNavTools(this.registry, this.commandService, this, this.toolbarId, this.pageNavId, this.selectionToolsId, {});
};
UsersList.prototype.getUsersListSubset = function(root) {
diff --git a/bundles/org.eclipse.orion.client.users/web/orion/profile/usersUtil.js b/bundles/org.eclipse.orion.client.users/web/orion/profile/usersUtil.js
index 623b591..b03f520 100644
--- a/bundles/org.eclipse.orion.client.users/web/orion/profile/usersUtil.js
+++ b/bundles/org.eclipse.orion.client.users/web/orion/profile/usersUtil.js
@@ -1,6 +1,6 @@
/*******************************************************************************
* @license
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * 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 Distribution
@@ -15,15 +15,18 @@
define(['i18n!profile/nls/messages', 'orion/webui/littlelib'], function(messages, lib) {
-function updateNavTools (registry, commandService, explorer, toolbarId, selectionToolbarId, item) {
+function updateNavTools (registry, commandService, explorer, toolbarId, pageNavId, selectionToolbarId, item) {
var eclipse = eclipse || {};
var toolbar = lib.node(toolbarId);
if (toolbar) {
commandService.destroy(toolbar);
- } else {
- throw messages["could not find toolbar "] + toolbarId;
+ commandService.renderCommands(toolbarId, toolbar, item, explorer, "button"); //$NON-NLS-0$
+ }
+ toolbar = lib.node(pageNavId);
+ if (toolbar) {
+ commandService.destroy(toolbar);
+ commandService.renderCommands(pageNavId, toolbar, item, explorer, "button"); //$NON-NLS-0$
}
- commandService.renderCommands(toolbarId, toolbar, item, explorer, "button"); //$NON-NLS-0$
if (selectionToolbarId) {
var selectionTools = lib.node(selectionToolbarId);
if (selectionTools) {
diff --git a/bundles/org.eclipse.orion.client.users/web/profile/user-list.js b/bundles/org.eclipse.orion.client.users/web/profile/user-list.js
index d2de73b..8946f10 100644
--- a/bundles/org.eclipse.orion.client.users/web/profile/user-list.js
+++ b/bundles/org.eclipse.orion.client.users/web/profile/user-list.js
@@ -1,6 +1,6 @@
/*******************************************************************************
* @license
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -31,7 +31,7 @@ define(['i18n!profile/nls/messages', 'require', 'orion/webui/littlelib', 'orion/
new mStatus.StatusReportingService(serviceRegistry, operationsClient, "statusPane", "notifications", "notificationArea"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
new mProgress.ProgressService(serviceRegistry, operationsClient, commandRegistry);
- var usersList = new mUsersList.UsersList(serviceRegistry, commandRegistry, selection, searcher, "usersList", "pageActions", "selectionTools", "userCommands"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var usersList = new mUsersList.UsersList(serviceRegistry, commandRegistry, selection, searcher, "usersList", "pageActions", "pageNavigationActions", "selectionTools", "userCommands"); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
mGlobalCommands.generateBanner("orion-userList", serviceRegistry, commandRegistry, preferences, searcher, usersList); //$NON-NLS-0$
@@ -151,8 +151,8 @@ define(['i18n!profile/nls/messages', 'require', 'orion/webui/littlelib', 'orion/
commandRegistry.addCommandGroup("pageActions", "eclipse.usersGroup", 100); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.addCommandGroup("selectionTools", "eclipse.selectionGroup", 500, messages["More"]); //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.registerCommandContribution("pageActions", "orion.userlist.prevPage", 2, "eclipse.usersGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- commandRegistry.registerCommandContribution("pageActions", "orion.userlist.nextPage", 3, "eclipse.usersGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.registerCommandContribution("pageNavigationActions", "orion.userlist.prevPage", 1); //$NON-NLS-1$ //$NON-NLS-0$
+ commandRegistry.registerCommandContribution("pageNavigationActions", "orion.userlist.nextPage", 2); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageActions", "eclipse.createUser", 1, "eclipse.usersGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$