diff options
author | Pushkar Joshi | 2012-04-03 15:07:07 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-03 15:07:07 -0700 |
commit | 12f988a32da12731ab35104128e396a6f388aeae (patch) | |
tree | 1333043a3d5573f32bcaaf8df9955aef5e2e9720 /js/io/ui/file-picker/file-input-field.reel/file-input-field.js | |
parent | 79fb912bdaa22b8107bbddc93d1779820af80cf9 (diff) | |
parent | c6de22bf42be90b403491b5f87b1818d9020310c (diff) | |
download | ninja-12f988a32da12731ab35104128e396a6f388aeae.tar.gz |
Merge branch 'master' into pentool
Diffstat (limited to 'js/io/ui/file-picker/file-input-field.reel/file-input-field.js')
-rwxr-xr-x | js/io/ui/file-picker/file-input-field.reel/file-input-field.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.js b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js index 651fd7fa..46e8b386 100755 --- a/js/io/ui/file-picker/file-input-field.reel/file-input-field.js +++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js | |||
@@ -20,6 +20,7 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
20 | this.eventManager.addEventListener("pickerSelectionsDone", function(evt){that.handleFileInputPickerSelectionsDone(evt);}, false); | 20 | this.eventManager.addEventListener("pickerSelectionsDone", function(evt){that.handleFileInputPickerSelectionsDone(evt);}, false); |
21 | 21 | ||
22 | this.newFileDirectory.addEventListener("keyup", function(evt){that.handleNewFileDirectoryOnkeyup(evt);}, false); | 22 | this.newFileDirectory.addEventListener("keyup", function(evt){that.handleNewFileDirectoryOnkeyup(evt);}, false); |
23 | this.newFileDirectory.addEventListener("paste", this, false); | ||
23 | } | 24 | } |
24 | }, | 25 | }, |
25 | 26 | ||
@@ -63,12 +64,21 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
63 | } | 64 | } |
64 | }, | 65 | }, |
65 | 66 | ||
67 | handlePaste:{ | ||
68 | value:function(evt){ | ||
69 | evt.preventDefault(); | ||
70 | evt.target.value = evt.clipboardData.getData("Text"); | ||
71 | this.handleNewFileDirectoryOnkeyup(evt); | ||
72 | } | ||
73 | }, | ||
74 | |||
66 | handleNewFileDirectoryOnkeyup:{ | 75 | handleNewFileDirectoryOnkeyup:{ |
67 | value:function(evt){ | 76 | value:function(evt){ |
68 | if(this.newFileDirectory.value !== ""){ | 77 | if(this.newFileDirectory.value !== ""){ |
69 | var newFileDirectorySetEvent = document.createEvent("Events"); | 78 | var newFileDirectorySetEvent = document.createEvent("Events"); |
70 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); | 79 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); |
71 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; | 80 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; |
81 | newFileDirectorySetEvent.keyCode = evt.keyCode; | ||
72 | this.eventManager.dispatchEvent(newFileDirectorySetEvent); | 82 | this.eventManager.dispatchEvent(newFileDirectorySetEvent); |
73 | } | 83 | } |
74 | } | 84 | } |