aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
index 849c665c..0e1e09a4 100755
--- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
@@ -18,34 +18,6 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
18 value:"25 px" 18 value:"25 px"
19 }, 19 },
20 20
21 // Populating the directory input field with the default save location or the last stored location.
22 prepareForDraw: {
23 value: function() {
24 var defaultSaveDirectory;
25
26 // Using session storage location
27 if(window.sessionStorage) {
28 var storedFolder = window.sessionStorage.getItem("lastOpenedFolderURI_folderSelection");
29 if(storedFolder) defaultSaveDirectory = decodeURI(window.sessionStorage.getItem("lastOpenedFolderURI_folderSelection"));
30 }
31
32 // Use default if none found in session storage
33 if(!defaultSaveDirectory) {
34 var driveData = this.application.ninja.coreIoApi.getDirectoryContents({uri:"", recursive:false, returnType:"all"});
35 if(driveData.success){
36 var topLevelDirectories = (JSON.parse(driveData.content)).children;
37 defaultSaveDirectory = topLevelDirectories[0].uri;
38 } else {
39 console.log("** Error ** Cannot get directory listing");
40 defaultSaveDirectory = "";
41 }
42 }
43
44 // Set the input field to the correct directory
45 this.fileInputField.newFileDirectory.value = defaultSaveDirectory;
46 }
47 },
48
49 didDraw: { 21 didDraw: {
50 value: function() { 22 value: function() {
51 this.fileInputField.selectDirectory = true; 23 this.fileInputField.selectDirectory = true;