aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-03 15:07:07 -0700
committerPushkar Joshi2012-04-03 15:07:07 -0700
commit12f988a32da12731ab35104128e396a6f388aeae (patch)
tree1333043a3d5573f32bcaaf8df9955aef5e2e9720 /js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
parent79fb912bdaa22b8107bbddc93d1779820af80cf9 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-12f988a32da12731ab35104128e396a6f388aeae.tar.gz
Merge branch 'master' into pentool
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js12
1 files changed, 12 insertions, 0 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 0e1e09a4..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,6 +23,17 @@ 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.addEventListener("paste", this, false);
27 this.newFileName.focus();
28 this.newFileName.select();
29 }
30 },
31
32 handlePaste:{
33 value:function(evt){
34 evt.preventDefault();
35 evt.target.value = evt.clipboardData.getData("Text");
36 this.handleKeyup(evt);
26 } 37 }
27 }, 38 },
28 39
@@ -32,6 +43,7 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
32 var newFileNameSetEvent = document.createEvent("Events"); 43 var newFileNameSetEvent = document.createEvent("Events");
33 newFileNameSetEvent.initEvent("newFileNameSet", false, false); 44 newFileNameSetEvent.initEvent("newFileNameSet", false, false);
34 newFileNameSetEvent.newFileName = this.newFileName.value; 45 newFileNameSetEvent.newFileName = this.newFileName.value;
46 newFileNameSetEvent.keyCode = evt.keyCode;
35 this.eventManager.dispatchEvent(newFileNameSetEvent); 47 this.eventManager.dispatchEvent(newFileNameSetEvent);
36 } 48 }
37 } 49 }