| author | Malgorzata Janczarska | 2011-05-26 07:22:51 (EDT) |
|---|---|---|
| committer | Malgorzata Janczarska | 2011-05-26 07:22:51 (EDT) |
| commit | dda4eff0db98b82f8620761b34f63141e823c323 (patch) (side-by-side diff) | |
| tree | 50f32f67ddae42d7f9e7313a8f9bd1ccd4a4a07a | |
| parent | 3ec97b1da80d89951dcaef27d3905acf6794055f (diff) | |
| download | org.eclipse.orion.client-dda4eff0db98b82f8620761b34f63141e823c323.zip org.eclipse.orion.client-dda4eff0db98b82f8620761b34f63141e823c323.tar.gz org.eclipse.orion.client-dda4eff0db98b82f8620761b34f63141e823c323.tar.bz2 | |
Bug 346975 - [client] Use dojo dialogs instead prompts - Create Branch
Change-Id: I5cbfc39cff0178656ae3c8443cd8d2bd94682b12
| -rw-r--r-- | bundles/org.eclipse.orion.client.git/static/js/gitCommands.js | 24 |
1 files changed, 16 insertions, 8 deletions
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 2b4aa68..eac4253 100644 --- a/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js +++ b/bundles/org.eclipse.orion.client.git/static/js/gitCommands.js @@ -258,14 +258,22 @@ dojo.require("widgets.GitCredentialsDialog"); image: "/images/add_obj.gif",
id: "eclipse.addBranch",
callback: function(item) {
- var branchName = prompt("Enter branch name");
- serviceRegistry.getService("orion.git.provider").then(
- function(service) {
- service.addBranch(item.Location, branchName).then(function(){
- dojo.hitch(explorer, explorer.changedItem)(item);
- });
- }
- );
+ var dialog = new widgets.NewItemDialog({
+ title: "Add Branch",
+ label: "Branch name:",
+ func: function(name, url, create){
+ serviceRegistry.getService("orion.git.provider").then(
+ function(service) {
+ service.addBranch(item.Location, name).then(function(){
+ dojo.hitch(explorer, explorer.changedItem)(item);
+ });
+ }
+ );
+ },
+ advanced: false
+ });
+ dialog.startup();
+ dialog.show();
},
visibleWhen: function(item) {
return item.GroupNode && item.Name === "Branch";
|

