diff options
author | Jonathan Duran | 2012-04-06 08:42:38 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-06 08:42:38 -0700 |
commit | 921a106cc1159b93068a4c635fcc0c74084446a5 (patch) | |
tree | 1cffdeb4a3d838f95bc0571da655615575a5375a /js/io/ui/file-picker/file-input-field.reel | |
parent | e186c49247689b5c2df6125037e2473636701d17 (diff) | |
parent | 7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff) | |
download | ninja-921a106cc1159b93068a4c635fcc0c74084446a5.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js/io/ui/file-picker/file-input-field.reel')
-rwxr-xr-x | js/io/ui/file-picker/file-input-field.reel/file-input-field.js | 21 |
1 files changed, 13 insertions, 8 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 46e8b386..0f66468a 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 | |||
@@ -21,6 +21,7 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
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 | this.newFileDirectory.addEventListener("paste", this, false); |
24 | this.newFileDirectory.addEventListener("search", this, false); | ||
24 | } | 25 | } |
25 | }, | 26 | }, |
26 | 27 | ||
@@ -74,16 +75,20 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
74 | 75 | ||
75 | handleNewFileDirectoryOnkeyup:{ | 76 | handleNewFileDirectoryOnkeyup:{ |
76 | value:function(evt){ | 77 | value:function(evt){ |
77 | if(this.newFileDirectory.value !== ""){ | 78 | var newFileDirectorySetEvent = document.createEvent("Events"); |
78 | var newFileDirectorySetEvent = document.createEvent("Events"); | 79 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); |
79 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); | 80 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; |
80 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; | 81 | newFileDirectorySetEvent.keyCode = evt.keyCode; |
81 | newFileDirectorySetEvent.keyCode = evt.keyCode; | 82 | this.eventManager.dispatchEvent(newFileDirectorySetEvent); |
82 | this.eventManager.dispatchEvent(newFileDirectorySetEvent); | ||
83 | } | ||
84 | } | 83 | } |
85 | }, | 84 | }, |
86 | 85 | ||
86 | handleSearch:{ | ||
87 | value:function(evt){ | ||
88 | this.handleNewFileDirectoryOnkeyup(evt); | ||
89 | } | ||
90 | }, | ||
91 | |||
87 | handleFileInputPickerSelectionsDone:{ | 92 | handleFileInputPickerSelectionsDone:{ |
88 | value: function(evt){ | 93 | value: function(evt){ |
89 | var selectedUri = ""; | 94 | var selectedUri = ""; |
@@ -105,7 +110,7 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
105 | if(!!obj && obj.uri && obj.uri.length > 0){ | 110 | if(!!obj && obj.uri && obj.uri.length > 0){ |
106 | selectedUri = obj.uri[0]; | 111 | selectedUri = obj.uri[0]; |
107 | this.newFileDirectory.value = selectedUri; | 112 | this.newFileDirectory.value = selectedUri; |
108 | 113 | this.newFileDirectory.focus(); | |
109 | var newFileDirectorySetEvent = document.createEvent("Events"); | 114 | var newFileDirectorySetEvent = document.createEvent("Events"); |
110 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); | 115 | newFileDirectorySetEvent.initEvent("newFileDirectorySet", false, false); |
111 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; | 116 | newFileDirectorySetEvent.newFileDirectory = this.newFileDirectory.value; |