aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker
diff options
context:
space:
mode:
authorEric Guzman2012-04-05 18:42:40 -0700
committerEric Guzman2012-04-05 18:42:40 -0700
commit8ff9dde2053e41d85bb27d9c91808a30e551a138 (patch)
tree8eec67d632d82d3052ed470096eda13fd50a55c8 /js/io/ui/file-picker
parent4631d54ffb4942378835689e9f5d70ed95610822 (diff)
parent7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff)
downloadninja-8ff9dde2053e41d85bb27d9c91808a30e551a138.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
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;