aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
diff options
context:
space:
mode:
authorEric Guzman2012-04-02 15:36:08 -0700
committerEric Guzman2012-04-02 15:36:08 -0700
commit0241bf331b7e06e206a54be441edf2f4c7261f63 (patch)
treeb7e2f9cad73eed4fc616cf1841cd0be02bd955d4 /js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
parentdde5b5054f93db493e5d4d502e677f5781334b08 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-0241bf331b7e06e206a54be441edf2f4c7261f63.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
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 }