aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker/file-input-field.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-02-21 23:31:37 -0800
committerJose Antonio Marquez Russo2012-02-21 23:31:37 -0800
commit9f87a6bb4d37a1e7201dd9452bcb91940733f07d (patch)
treebdd7f0f4f8851652bf188fbad249ea1fe7c33666 /js/io/ui/file-picker/file-input-field.reel
parente17fb41feca768d746f89d90cef28192fa60c621 (diff)
parent69983b800d0179fcccd5b61b64ed22c02e22b93a (diff)
downloadninja-9f87a6bb4d37a1e7201dd9452bcb91940733f07d.tar.gz
Merge pull request #14 from mencio/file-io
File io - Code cleanup and added default folder to the file new dialog.
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