summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMalgorzata Janczarska2011-05-23 06:52:25 (EDT)
committer Malgorzata Janczarska2011-05-23 06:52:25 (EDT)
commitecb10a40a64c4c4adf178ec25928e7bca9e11889 (patch)
tree928a3491c9d2932416f12ff368b57549a23dd3d6
parentf77662c2c00577603fbbfbf6500db7bfdda4bb81 (diff)
downloadorg.eclipse.orion.client-ecb10a40a64c4c4adf178ec25928e7bca9e11889.zip
org.eclipse.orion.client-ecb10a40a64c4c4adf178ec25928e7bca9e11889.tar.gz
org.eclipse.orion.client-ecb10a40a64c4c4adf178ec25928e7bca9e11889.tar.bz2
Bug 345919 - [client][git] Change Git clone UI for new API - new git
-rw-r--r--bundles/org.eclipse.orion.client.git/static/js/gitClient.js7
-rw-r--r--bundles/org.eclipse.orion.client.git/static/js/gitCommands.js4
-rw-r--r--bundles/org.eclipse.orion.client.git/static/js/widgets/CloneGitRepositoryDialog.js5
-rw-r--r--bundles/org.eclipse.orion.client.git/static/js/widgets/templates/CloneGitRepositoryDialog.html12
4 files changed, 20 insertions, 8 deletions
diff --git a/bundles/org.eclipse.orion.client.git/static/js/gitClient.js b/bundles/org.eclipse.orion.client.git/static/js/gitClient.js
index dc04e57..1b1db0f 100644
--- a/bundles/org.eclipse.orion.client.git/static/js/gitClient.js
+++ b/bundles/org.eclipse.orion.client.git/static/js/gitClient.js
@@ -36,13 +36,16 @@ eclipse.GitService = (function() {
var service = this;
console.info("Git Service checked");
},
- cloneGitRepository : function(gitName, gitRepoUrl, repoLocation, gitSshUsername, gitSshPassword, gitSshKnownHost, privateKey, passphrase) {
+ cloneGitRepository : function(gitName, gitRepoUrl, targetPath, repoLocation, gitSshUsername, gitSshPassword, gitSshKnownHost, privateKey, passphrase) {
var postData = {};
if(gitName){
postData.Name = gitName;
}
+ if(targetPath){
+ postData.Path = targetPath;
+ }
postData.GitUrl=gitRepoUrl;
- postData.Path = repoLocation;
+ postData.Location = repoLocation;
if(gitSshUsername){
postData.GitSshUsername = gitSshUsername;
}
diff --git a/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js b/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js
index 6ec9d2d..df8a21a 100644
--- a/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js
+++ b/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js
@@ -135,12 +135,12 @@ dojo.require("widgets.GitCredentialsDialog");
id : "eclipse.cloneGitRepository",
callback : function(item) {
var dialog = new widgets.CloneGitRepositoryDialog({
- func : function(gitUrl, location){
+ func : function(gitUrl, path, name){
eclipse.gitCommandUtils.getDefaultSshOptions(serviceRegistry).then(function(options){
var func = arguments.callee;
serviceRegistry.getService("IGitService").then(function(gitService) {
serviceRegistry.getService("IStatusReporter").then(function(progressService) {
- var deferred = gitService.cloneGitRepository(null, gitUrl, location, options.gitSshUsername, options.gitSshPassword, options.knownHosts, options.gitPrivateKey, options.gitPassphrase);
+ var deferred = gitService.cloneGitRepository(name, gitUrl, path, explorer.defaultPath, options.gitSshUsername, options.gitSshPassword, options.knownHosts, options.gitPrivateKey, options.gitPassphrase);
progressService.showWhile(deferred, "Cloning repository: " + gitUrl).then(
function(jsonData, secondArg) {
eclipse.gitCommandUtils.handleProgressServiceResponse(jsonData, options, serviceRegistry,
diff --git a/bundles/org.eclipse.orion.client.git/static/js/widgets/CloneGitRepositoryDialog.js b/bundles/org.eclipse.orion.client.git/static/js/widgets/CloneGitRepositoryDialog.js
index 9def5dc..8bc0239 100644
--- a/bundles/org.eclipse.orion.client.git/static/js/widgets/CloneGitRepositoryDialog.js
+++ b/bundles/org.eclipse.orion.client.git/static/js/widgets/CloneGitRepositoryDialog.js
@@ -31,7 +31,8 @@ dojo.declare("widgets.CloneGitRepositoryDialog", [dijit.Dialog], {
this.inherited(arguments);
this.title = "Clone Git Repository";
this.gitUrlLabelText = "Repository URL:";
- this.gitLocationLabelText = "Clone to:";
+ this.gitPathLabelText = "Existing directory:";
+ this.gitNameLabelText = "New project:";
this.buttonCancel = "Cancel";
},
@@ -54,6 +55,6 @@ dojo.declare("widgets.CloneGitRepositoryDialog", [dijit.Dialog], {
},
// Stuff from newItemDialog.js is below
execute: function() {
- this.options.func(this.gitUrl.value, this.gitLocation.value);
+ this.options.func(this.gitUrl.value, this.gitPath.value, this.gitName.value);
}
}); \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.git/static/js/widgets/templates/CloneGitRepositoryDialog.html b/bundles/org.eclipse.orion.client.git/static/js/widgets/templates/CloneGitRepositoryDialog.html
index 10c1a1c..9d53850 100644
--- a/bundles/org.eclipse.orion.client.git/static/js/widgets/templates/CloneGitRepositoryDialog.html
+++ b/bundles/org.eclipse.orion.client.git/static/js/widgets/templates/CloneGitRepositoryDialog.html
@@ -18,12 +18,20 @@
</div>
<div style="display: table-row">
<div style="display: table-cell; padding: 5">
- <label dojoAttachPoint="gitLocationLabel" for="${id}_gitLocation" style="padding-right: 10">${gitLocationLabelText}</label>
+ <label dojoAttachPoint="gitPathLabel" for="${id}_gitPath" style="padding-right: 10">${gitPathLabelText}</label>
</div>
<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">
- <input dojoAttachPoint="gitLocation" id="${id}_gitLocation" style="display: inline-block; width: 98%;" value="">
+ <input dojoAttachPoint="gitPath" id="${id}_gitPath" style="display: inline-block; width: 98%;" value="">
<br><i>This is to be replaced with directory picker dialog</i>
</div>
+ </div>
+ <div style="display: table-row">
+ <div style="display: table-cell; padding: 5">
+ <label dojoAttachPoint="gitNameLabel" for="${id}_gitName" style="padding-right: 10">${gitNameLabelText}</label>
+ </div>
+ <div style="display: table-cell; padding: 5; width: 40em; text-align: left;">
+ <input dojoAttachPoint="gitName" id="${id}_gitName" style="display: inline-block; width: 98%;" value="">
+ </div>
</div>
<div style="display: table-row">
<div style="display: table-cell; padding: 5"></div>