aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/file-picker
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/file-picker')
-rwxr-xr-xjs/io/ui/file-picker/file-picker-controller.js7
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js2
2 files changed, 7 insertions, 2 deletions
diff --git a/js/io/ui/file-picker/file-picker-controller.js b/js/io/ui/file-picker/file-picker-controller.js
index 105dc223..e3276ee6 100755
--- a/js/io/ui/file-picker/file-picker-controller.js
+++ b/js/io/ui/file-picker/file-picker-controller.js
@@ -23,6 +23,11 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
23 } 23 }
24 }, 24 },
25 25
26 pickerNavChoices:{
27 enumerable: true,
28 value: null
29 },
30
26 filePickerPopupType:{ 31 filePickerPopupType:{
27 enumerable: false, 32 enumerable: false,
28 value: "filePicker" 33 value: "filePicker"
@@ -149,7 +154,7 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
149 writable:false, 154 writable:false,
150 enumerable:true, 155 enumerable:true,
151 value:function(callback, aModel){ 156 value:function(callback, aModel){
152 var pickerNavChoices = Montage.create(pickerNavigatorReel); 157 var pickerNavChoices = this.pickerNavChoices = Montage.create(pickerNavigatorReel);
153 var initUri = aModel.currentRoot; 158 var initUri = aModel.currentRoot;
154 159
155 //remove extra / at the end 160 //remove extra / at the end
diff --git a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
index 7a9d90b4..e31fa29d 100644
--- a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
+++ b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
@@ -258,7 +258,6 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, {
258 this.element.addEventListener("refreshTreeSegment", function(evt){that.handlePickerNavRefreshTreeSegment(evt);}, false); 258 this.element.addEventListener("refreshTreeSegment", function(evt){that.handlePickerNavRefreshTreeSegment(evt);}, false);
259 this.resultsArea.addEventListener("click", function(evt){that.handleResultsAreaClick(evt);}, false); 259 this.resultsArea.addEventListener("click", function(evt){that.handleResultsAreaClick(evt);}, false);
260 this.element.addEventListener("click", function(evt){that.handlePickerNavClick(evt);}, false); 260 this.element.addEventListener("click", function(evt){that.handlePickerNavClick(evt);}, false);
261
262 this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false); 261 this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false);
263 this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false); 262 this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false);
264 263
@@ -1071,6 +1070,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, {
1071 //clear memory - TODO:check for more memory leaks 1070 //clear memory - TODO:check for more memory leaks
1072 this.pickerModel = null; 1071 this.pickerModel = null;
1073 this.application.ninja.filePickerController._directoryContentCache = {}; 1072 this.application.ninja.filePickerController._directoryContentCache = {};
1073 this.application.ninja.filePickerController.pickerNavChoices = null;
1074 //remove listeners 1074 //remove listeners
1075 this.element.removeEventListener("openFolder", this, false);//add icon double click event listener to reload iconList with new set of data 1075 this.element.removeEventListener("openFolder", this, false);//add icon double click event listener to reload iconList with new set of data
1076 this.element.removeEventListener("selectedItem", this, false);//for single selection only 1076 this.element.removeEventListener("selectedItem", this, false);//for single selection only