aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui
diff options
context:
space:
mode:
authorAnanya Sen2012-03-22 10:46:39 -0700
committerAnanya Sen2012-03-22 10:46:39 -0700
commit7a7ac1d6479155760d99b7ecdf5a8d1f63e25f24 (patch)
treec20438334b30d969fbed01ceef33fe5dad700fc9 /js/io/ui
parentf639ae09013dfb6559891bbbe560bd5303a05f97 (diff)
downloadninja-7a7ac1d6479155760d99b7ecdf5a8d1f63e25f24.tar.gz
IKNINJA-1361: autofocus and auto-select file name on open of new file and save as dialog
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui')
-rwxr-xr-xjs/io/ui/file-picker/file-picker-controller.js2
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js2
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js3
3 files changed, 5 insertions, 2 deletions
diff --git a/js/io/ui/file-picker/file-picker-controller.js b/js/io/ui/file-picker/file-picker-controller.js
index e3276ee6..436a50f3 100755
--- a/js/io/ui/file-picker/file-picker-controller.js
+++ b/js/io/ui/file-picker/file-picker-controller.js
@@ -130,8 +130,6 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
130 } 130 }
131 131
132 if(!!storedUri){ 132 if(!!storedUri){
133 // This is depracated -- use decodeURI instead
134 //aModel.currentRoot = unescape(storedUri);
135 aModel.currentRoot = decodeURI(storedUri); 133 aModel.currentRoot = decodeURI(storedUri);
136 } 134 }
137 135
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, {
23 this.fileInputField.selectDirectory = true; 23 this.fileInputField.selectDirectory = true;
24 24
25 this.newFileName.addEventListener("keyup", this, false); 25 this.newFileName.addEventListener("keyup", this, false);
26 this.newFileName.focus();
27 this.newFileName.select();
26 } 28 }
27 }, 29 },
28 30
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 4d07ca66..1910f30d 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
@@ -60,6 +60,9 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
60 this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); 60 this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false);
61 this.cancelButton.addEventListener("click", function(evt){self.handleCancelButtonAction(evt);}, false); 61 this.cancelButton.addEventListener("click", function(evt){self.handleCancelButtonAction(evt);}, false);
62 62
63 this.newFileName.focus();
64 this.newFileName.select();
65
63 this.enableOk(); 66 this.enableOk();
64 } 67 }
65 }, 68 },