aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker
diff options
context:
space:
mode:
authorJonathan Duran2012-04-06 08:42:38 -0700
committerJonathan Duran2012-04-06 08:42:38 -0700
commit921a106cc1159b93068a4c635fcc0c74084446a5 (patch)
tree1cffdeb4a3d838f95bc0571da655615575a5375a /js/io/ui/file-picker
parente186c49247689b5c2df6125037e2473636701d17 (diff)
parent7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff)
downloadninja-921a106cc1159b93068a4c635fcc0c74084446a5.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js/io/ui/file-picker')
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js21
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;