aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/save-as-dialog.reel/save-as-dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/save-as-dialog.reel/save-as-dialog.js')
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
index dfaac1aa..d59d5be1 100644
--- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
@@ -64,6 +64,21 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
64 this.newFileName.select(); 64 this.newFileName.select();
65 65
66 this.enableOk(); 66 this.enableOk();
67
68 this.element.addEventListener("keyup", function(evt){
69 if(evt.keyCode == 27) {//ESC key
70 if(self.application.ninja.newFileController.saveAsDialog !== null){
71 self.handleCancelButtonAction();
72 }
73 }else if((evt.keyCode == 13) && !(evt.ctrlKey || evt.metaKey)){//ENTER key
74 if((self.application.ninja.newFileController.saveAsDialog !== null)
75 && !self.okButton.hasAttribute("disabled")){
76
77 self.handleOkButtonAction();
78 }
79 }
80 }, true);
81
67 } 82 }
68 }, 83 },
69 84