aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog
diff options
context:
space:
mode:
authorAnanya Sen2012-04-04 13:20:15 -0700
committerAnanya Sen2012-04-04 13:20:15 -0700
commit22ade57a30b45774882028eef4ab5a5bffe1a624 (patch)
tree52e589450eeb8adf7e11b66bd222fec5fa66c963 /js/io/ui/new-file-dialog
parentbec4cde986975d1cc5f1d2791fdb18548fc2d72a (diff)
parent8482e23cd9b8c4700b5130f2588e5eb24d376536 (diff)
downloadninja-22ade57a30b45774882028eef4ab5a5bffe1a624.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Codeview-improvements
Diffstat (limited to 'js/io/ui/new-file-dialog')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js11
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js4
2 files changed, 12 insertions, 3 deletions
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 fac4c488..02579676 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,11 +23,20 @@ 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(); 26 this.newFileName.addEventListener("paste", this, false);
27 this.newFileName.focus();
27 this.newFileName.select(); 28 this.newFileName.select();
28 } 29 }
29 }, 30 },
30 31
32 handlePaste:{
33 value:function(evt){
34 evt.preventDefault();
35 evt.target.value = evt.clipboardData.getData("Text");
36 this.handleKeyup(evt);
37 }
38 },
39
31 handleKeyup:{ 40 handleKeyup:{
32 value:function(evt){ 41 value:function(evt){
33 if(this.newFileName.value !== "") { 42 if(this.newFileName.value !== "") {
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 18556bc5..c98955ca 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
@@ -326,8 +326,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
326 326
327 handleNewFileDirectorySet:{ 327 handleNewFileDirectorySet:{
328 value:function(evt){ 328 value:function(evt){
329 if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ 329 if(evt.keyCode === 13){
330 this.handleOkButtonAction(evt); 330 if(!this.okButton.hasAttribute("disabled")) this.handleOkButtonAction(evt);
331 }else if(evt.keyCode === 27){ 331 }else if(evt.keyCode === 27){
332 this.handleCancelButtonAction(evt); 332 this.handleCancelButtonAction(evt);
333 } 333 }