From 91f6f672ee96c6e7e942b555af7057d6db52d90f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 22 Feb 2012 11:50:25 -0800 Subject: moving the default folder location to the navigator to fix the ok button issue Signed-off-by: Valerio Virgillito --- .../new-file-location.reel/new-file-location.js | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js') 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, { value:"25 px" }, - // Populating the directory input field with the default save location or the last stored location. - prepareForDraw: { - value: function() { - var defaultSaveDirectory; - - // Using session storage location - if(window.sessionStorage) { - var storedFolder = window.sessionStorage.getItem("lastOpenedFolderURI_folderSelection"); - if(storedFolder) defaultSaveDirectory = decodeURI(window.sessionStorage.getItem("lastOpenedFolderURI_folderSelection")); - } - - // Use default if none found in session storage - if(!defaultSaveDirectory) { - var driveData = this.application.ninja.coreIoApi.getDirectoryContents({uri:"", recursive:false, returnType:"all"}); - if(driveData.success){ - var topLevelDirectories = (JSON.parse(driveData.content)).children; - defaultSaveDirectory = topLevelDirectories[0].uri; - } else { - console.log("** Error ** Cannot get directory listing"); - defaultSaveDirectory = ""; - } - } - - // Set the input field to the correct directory - this.fileInputField.newFileDirectory.value = defaultSaveDirectory; - } - }, - didDraw: { value: function() { this.fileInputField.selectDirectory = true; -- cgit v1.2.3