aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Bendkowski2012-09-18 07:20:43 (EDT)
committerMalgorzata Janczarska2012-09-18 07:48:13 (EDT)
commit888918d99b69dcc86de041c0bf77846df28fd754 (patch)
tree27c02d8bd475fa0ad765ac180964f1dbe2b178a5
parentca85f4f3f68d65d0f9bf86b8e57033bd19c55202 (diff)
downloadorg.eclipse.orion.client-888918d99b69dcc86de041c0bf77846df28fd754.zip
org.eclipse.orion.client-888918d99b69dcc86de041c0bf77846df28fd754.tar.gz
org.eclipse.orion.client-888918d99b69dcc86de041c0bf77846df28fd754.tar.bz2
Bug 388917 - Comments on Git Credentials actions
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/settings/nls/root/messages.js3
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/LabeledRepositoryLink.js48
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/UserSettings.js22
3 files changed, 2 insertions, 71 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/settings/nls/root/messages.js b/bundles/org.eclipse.orion.client.core/web/orion/settings/nls/root/messages.js
index fda7b33..0c7d164 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/settings/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/settings/nls/root/messages.js
@@ -104,10 +104,7 @@ define({
"JavaScript Object": "JavaScript Object",
"click here, then check javascript console to drill down": "click here, then check javascript console to drill down",
"Item" : "Item",
- "Erase Key" : "Erase Key",
"Git Config" : "Git Config",
- "Reset" : "Reset",
- "Reset Git Credentials" : "Reset Git Credentials",
"Clear Git Credentials" : "Clear Git Credentials",
"Enable Storage" : "Enable Storage",
"Please be aware that your credentials will be stored persistently in the browser." : "Please be aware that your credentials will be stored persistently in the browser.",
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/LabeledRepositoryLink.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/LabeledRepositoryLink.js
deleted file mode 100644
index cb1f420..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/LabeledRepositoryLink.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2012 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
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-/*global dojo dijit widgets orion window console define localStorage*/
-/*jslint browser:true*/
-
-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a
- category, the right shows the resulting HTML for that category. */
-
-define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'orion/git/GitCredentialsStorage'], function(messages, require, dojo, dijit, mUtil, mCommands, GitCredentialsStorage) {
-
- dojo.declare("orion.widgets.settings.LabeledRepositoryLink",[dijit._Widget, dijit._Templated],{ //$NON-NLS-0$
-
- templateString: '<div>' + //$NON-NLS-0$
- '<label>' + //$NON-NLS-0$
- '<span class="setting-repository-label" data-dojo-attach-point="mylabel">'+messages['Label:']+'</span>' + //$NON-NLS-2$ //$NON-NLS-0$
- '<a href="#" data-dojo-attach-event="onclick:change">'+messages["Erase Key"]+'</a>' + //$NON-NLS-0$
- '</label>' + //$NON-NLS-0$
- '</div>', //$NON-NLS-0$
-
- setStorageItem: function(){
-
- },
-
- change: function(){
- var gitCredentialsStorage = new GitCredentialsStorage();
- if(gitCredentialsStorage.isBrowserEnabled()){
- gitCredentialsStorage.erasePrompt(this.mylabel.innerHTML);
- }
- },
-
- postCreate: function(){
- this.inherited( arguments );
- this.mylabel.innerHTML = this.fieldlabel; //$NON-NLS-0$
- },
-
- startup: function(){
-
- }
- });
-}); \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/UserSettings.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/UserSettings.js
index 7062f7b..8f818d7 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/UserSettings.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/settings/UserSettings.js
@@ -181,23 +181,7 @@ define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'dijit', 'orion/u
}
gitCredentialsSection = new orion.widgets.settings.Section( {sectionName:"", container: this.gitSections, sections: this.gitCredentialsFields} );
-
- var clearCredentials = new mCommands.Command({
- name: messages["Reset"],
- tooltip: messages["Reset Git Credentials"],
- id: "orion.clearGitCredentials",
- callback: dojo.hitch(this, function(data){
- var gitCredentialsStorage = new GitCredentialsStorage();
- if(gitCredentialsStorage.isBrowserEnabled()){
- gitCredentialsStorage.clearCredentials();
-
- var messageService = this.registry.getService("orion.page.message");
- messageService.setProgressResult("Git credentials successfully cleared.");
- this.refreshGitCredentials();
- }
- })
- });
-
+
var updateGitCredentialsCommand = new mCommands.Command({
name: messages["Update"],
tooltip: messages["Update Git Credentials"],
@@ -209,10 +193,8 @@ define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'dijit', 'orion/u
});
this.commandService.addCommand(updateGitCredentialsCommand);
- this.commandService.registerCommandContribution('gitProfileCommands', "orion.updateGitCredentials", 3); //$NON-NLS-1$ //$NON-NLS-0$
+ this.commandService.registerCommandContribution('gitProfileCommands', "orion.updateGitCredentials", 2); //$NON-NLS-1$ //$NON-NLS-0$
- this.commandService.addCommand(clearCredentials);
- this.commandService.registerCommandContribution('gitProfileCommands', "orion.clearGitCredentials", 2);
this.commandService.renderCommands('gitProfileCommands', dojo.byId( 'gitCommands' ), this, this, "button"); //$NON-NLS-1$ //$NON-NLS-0$
this.linkedAccountSection = new mSection.Section(this.linkedSection, {