aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker/file-input-field.reel
diff options
context:
space:
mode:
authorJon Reid2012-02-27 12:08:17 -0800
committerJon Reid2012-02-27 12:08:17 -0800
commitd55224f36da55e26c266a02efa6e58d4ecf1253e (patch)
tree36faa8ff93c0f7b925f5c0a7fb85b5d209da1f8e /js/io/ui/file-picker/file-input-field.reel
parentec5f81c6c0ccf865505ab82ebf9240c667f05c91 (diff)
parentcf9e9b711ba3d77a2a0888f8ab763383f53a1619 (diff)
downloadninja-d55224f36da55e26c266a02efa6e58d4ecf1253e.tar.gz
Merge remote-tracking branch 'ninja-jduran/Timeline' into Timeline-local
Diffstat (limited to 'js/io/ui/file-picker/file-input-field.reel')
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js21
1 files changed, 4 insertions, 17 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 235be8ad..651fd7fa 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
@@ -9,24 +9,13 @@ var Montage = require("montage/core/core").Montage,
9 9
10var FileInputField = exports.FileInputField = Montage.create(Component, { 10var FileInputField = exports.FileInputField = Montage.create(Component, {
11 11
12 hasReel: {
13 value: true
14 },
15
16 willDraw: {
17 enumerable: false,
18 value: function() {}
19 },
20 draw: {
21 enumerable: false,
22 value: function() {}
23 },
24 didDraw: { 12 didDraw: {
25 enumerable: false, 13 enumerable: false,
26 value: function() { 14 value: function() {
27 var that = this; 15 var that = this;
28 this.findDirectory.identifier = "findDirectory"; 16 this.findDirectory.identifier = "findDirectory";
29 this.findDirectory.addEventListener("click", function(evt){that.handleFindDirectoryClick(evt);}, false); 17
18 this.findDirectory.addEventListener("click", this, false);
30 19
31 this.eventManager.addEventListener("pickerSelectionsDone", function(evt){that.handleFileInputPickerSelectionsDone(evt);}, false); 20 this.eventManager.addEventListener("pickerSelectionsDone", function(evt){that.handleFileInputPickerSelectionsDone(evt);}, false);
32 21
@@ -60,8 +49,6 @@ var FileInputField = exports.FileInputField = Montage.create(Component, {
60 49
61 handleFindDirectoryClick: { 50 handleFindDirectoryClick: {
62 value: function(evt){ 51 value: function(evt){
63 var openFilePicker = document.createEvent("Events");
64 openFilePicker.initEvent("openFilePicker", false, false);
65 var settings = {}; 52 var settings = {};
66 if(this.selectDirectory === true){ 53 if(this.selectDirectory === true){
67 settings.inFileMode = false; 54 settings.inFileMode = false;
@@ -71,8 +58,8 @@ var FileInputField = exports.FileInputField = Montage.create(Component, {
71 settings.pickerName = this.pickerName || "fileSelector"; 58 settings.pickerName = this.pickerName || "fileSelector";
72 } 59 }
73 settings.callback = this.filePickerCallback.bind(this); 60 settings.callback = this.filePickerCallback.bind(this);
74 openFilePicker.settings = settings; 61
75 this.eventManager.dispatchEvent(openFilePicker); 62 NJevent("openFilePicker", settings);
76 } 63 }
77 }, 64 },
78 65