aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker/file-input-field.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-02-22 12:18:25 -0800
committerAnanya Sen2012-02-22 12:18:25 -0800
commitdbf0ca5637a3bca87c21c65ada47f8a4d794f78c (patch)
treeace2a2415ef14662c27cdb2528914bef0a7f9208 /js/io/ui/file-picker/file-input-field.reel
parent9aa442da1ac9fd3212b37fa63a36090af47b6808 (diff)
parent27589634d3e8ea52abe8623f8f2cc48ce0aa04c9 (diff)
downloadninja-dbf0ca5637a3bca87c21c65ada47f8a4d794f78c.tar.gz
Merge branch 'refs/heads/FileIO-jose' into FileIO
Conflicts: js/controllers/document-controller.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
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