diff options
author | Ananya Sen | 2012-03-22 10:38:44 -0700 |
---|---|---|
committer | Ananya Sen | 2012-03-22 10:38:44 -0700 |
commit | 2557f463c1cfe2d0dd8ea187c184755bd141dab4 (patch) | |
tree | a842cee837b5d0c5a314bdd98b3c96eb98f154da /js/io/ui/new-file-dialog/new-file-options-navigator.reel | |
parent | 61a419422b1a05a779fd9a66c53de3fa8ab5f65a (diff) | |
download | ninja-2557f463c1cfe2d0dd8ea187c184755bd141dab4.tar.gz |
IKNINJA-1302 : For File>New and File>SaveAll dialogs, 'ESC' key now triggers Cancel button and 'Enter' key now triggers OK button. For File picker, the 'ESC' now triggers the Cancel button.
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Conflicts:
js/io/ui/new-file-dialog/new-file-workflow-controller.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-options-navigator.reel')
-rw-r--r-- | js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js index aaf39005..5adcc250 100644 --- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js +++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | |||
@@ -106,6 +106,12 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
106 | this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false); | 106 | this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false); |
107 | this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false); | 107 | this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false); |
108 | 108 | ||
109 | this.element.addEventListener("enterPressed", function(evt){ | ||
110 | if(!that.okButton.hasAttribute("disabled")){ | ||
111 | that.handleOkButtonAction(evt); | ||
112 | } | ||
113 | }, false); | ||
114 | |||
109 | if(!!this.newFileModel.defaultProjectType){ | 115 | if(!!this.newFileModel.defaultProjectType){ |
110 | var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType); | 116 | var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType); |
111 | this.templateList = iconsListModule.IconsList.create(); | 117 | this.templateList = iconsListModule.IconsList.create(); |
@@ -382,6 +388,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
382 | this.element.removeEventListener("selectedItem", function(evt){that.handleNewFileNavSelectedItem(evt);}, false);//for single selection only | 388 | this.element.removeEventListener("selectedItem", function(evt){that.handleNewFileNavSelectedItem(evt);}, false);//for single selection only |
383 | this.eventManager.removeEventListener("newFileDirectorySet", function(evt){that.handleNewFileDirectorySet(evt);}, false); | 389 | this.eventManager.removeEventListener("newFileDirectorySet", function(evt){that.handleNewFileDirectorySet(evt);}, false); |
384 | this.eventManager.removeEventListener("newFileNameSet", function(evt){that.handleNewFileNameSet(evt);}, false); | 390 | this.eventManager.removeEventListener("newFileNameSet", function(evt){that.handleNewFileNameSet(evt);}, false); |
391 | |||
392 | this.application.ninja.newFileController.newFileOptionsNav = null; | ||
385 | } | 393 | } |
386 | }, | 394 | }, |
387 | 395 | ||