From 2557f463c1cfe2d0dd8ea187c184755bd141dab4 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:38:44 -0700 Subject: 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 Conflicts: js/io/ui/new-file-dialog/new-file-workflow-controller.js Signed-off-by: Ananya Sen --- .../ui/new-file-dialog/new-file-location.reel/new-file-location.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js') diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js index 0e1e09a4..c4b7ea99 100755 --- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js @@ -34,6 +34,12 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { newFileNameSetEvent.newFileName = this.newFileName.value; this.eventManager.dispatchEvent(newFileNameSetEvent); } + if(evt.keyCode === 13){ + var enterPressedEvent = document.createEvent("Events"); + enterPressedEvent.initEvent("enterPressed", false, false); + enterPressedEvent.newFileName = this.newFileName.value; + this.eventManager.dispatchEvent(enterPressedEvent); + } } } -- cgit v1.2.3 From 5b0ff2b7347d158876c366c51988a94570dda18b Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:43:54 -0700 Subject: IKNINJA-1302 : more fix Signed-off-by: Ananya Sen --- .../ui/new-file-dialog/new-file-location.reel/new-file-location.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js') diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js index c4b7ea99..811231e4 100755 --- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js @@ -32,14 +32,9 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { var newFileNameSetEvent = document.createEvent("Events"); newFileNameSetEvent.initEvent("newFileNameSet", false, false); newFileNameSetEvent.newFileName = this.newFileName.value; + newFileNameSetEvent.keyCode = evt.keyCode; this.eventManager.dispatchEvent(newFileNameSetEvent); } - if(evt.keyCode === 13){ - var enterPressedEvent = document.createEvent("Events"); - enterPressedEvent.initEvent("enterPressed", false, false); - enterPressedEvent.newFileName = this.newFileName.value; - this.eventManager.dispatchEvent(enterPressedEvent); - } } } -- cgit v1.2.3 From 7a7ac1d6479155760d99b7ecdf5a8d1f63e25f24 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:46:39 -0700 Subject: IKNINJA-1361: autofocus and auto-select file name on open of new file and save as dialog Signed-off-by: Ananya Sen --- js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js') diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js index 811231e4..fac4c488 100755 --- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js @@ -23,6 +23,8 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { this.fileInputField.selectDirectory = true; this.newFileName.addEventListener("keyup", this, false); + this.newFileName.focus(); + this.newFileName.select(); } }, -- cgit v1.2.3