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 --- js/io/ui/new-file-dialog/new-file-workflow-controller.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'js/io/ui/new-file-dialog/new-file-workflow-controller.js') diff --git a/js/io/ui/new-file-dialog/new-file-workflow-controller.js b/js/io/ui/new-file-dialog/new-file-workflow-controller.js index d065ca35..279a74b4 100755 --- a/js/io/ui/new-file-dialog/new-file-workflow-controller.js +++ b/js/io/ui/new-file-dialog/new-file-workflow-controller.js @@ -27,6 +27,16 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre value: null }, + newFileOptionsNav:{ + enumerable:true, + value: null + }, + + saveAsDialog:{ + enumerable:true, + value: null + }, + showNewFileDialog:{ writable:false, enumerable:true, @@ -49,7 +59,7 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre this.model.defaultProjectType = lastSelectedProjectType; } - var newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); + var newFileOptionsNav = this.newFileOptionsNav = newFileOptionsNavigatorModule.NewFileOptionsNavigator.create(); newFileOptionsNav.newFileModel = this.model; var popup = Popup.create(); @@ -70,7 +80,7 @@ var NewFileWorkflowController = exports.NewFileWorkflowController = Montage.cre var fileName = data.fileName || "filename.txt"; var folderUri = data.folderUri || "/Documents"; - var saveAsDialog = saveAsModule.SaveAsDialog.create(); + var saveAsDialog = this.saveAsDialog = saveAsModule.SaveAsDialog.create(); saveAsDialog.fileName = fileName; saveAsDialog.folderUri = folderUri; saveAsDialog.callback = data.callback; -- cgit v1.2.3