diff options
author | Pushkar Joshi | 2012-04-06 12:13:59 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-06 12:13:59 -0700 |
commit | 6cce5e9367676f5b452c28dd7d960aa46f4e464c (patch) | |
tree | 779125b7c1fc668c02e0dfbb661494a16242c329 /js/io/ui/file-picker | |
parent | f61545fd7054088efc88aafffd78e11df80d750d (diff) | |
parent | 7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff) | |
download | ninja-6cce5e9367676f5b452c28dd7d960aa46f4e464c.tar.gz |
Merge branch 'master' into pentool
Diffstat (limited to 'js/io/ui/file-picker')
-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; |