diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py index 1a8b59b..9070e76 100644 --- a/web/pgadmin/misc/file_manager/__init__.py +++ b/web/pgadmin/misc/file_manager/__init__.py @@ -1102,7 +1102,9 @@ class Filemanager(object): # Remove root storage path from error message # when running in Server mode if not status and not current_app.PGADMIN_RUNTIME: - err_msg = err_msg.replace(get_storage_directory(), '') + storage_directory = get_storage_directory() + if storage_directory: + err_msg = err_msg.replace(storage_directory, '') return status, err_msg, is_binary, is_startswith_bom, enc diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js index e543aae..99e632f 100755 --- a/web/pgadmin/misc/file_manager/static/js/utility.js +++ b/web/pgadmin/misc/file_manager/static/js/utility.js @@ -1026,8 +1026,8 @@ var getFolderInfo = function(path, file_type) { var path = $('td:first-child', this).attr('title'); if (path.lastIndexOf('/') == path.length - 1 || path.lastIndexOf('\\') == path.length - 1) { - $('.file_manager_ok').removeClass('disabled'); - $('.file_manager_ok').attr('disabled', false); + $('.file_manager_ok').addClass('disabled'); + $('.file_manager_ok').attr('disabled', true); $('.file_manager button.download').attr('disabled', 'disabled'); $('.file_manager button.delete, .file_manager button.rename').attr('disabled', 'disabled'); getFolderInfo(path); @@ -1133,9 +1133,9 @@ pgAdmin.FileUtils = { var select_box = "
" + gettext("Show hidden files and folders") + - "? " + + "? " + "" + - ""; while(i < types_len) { t = allowed_types[i]; @@ -1315,7 +1315,6 @@ pgAdmin.FileUtils = { check_obj = function(path, check) { var path = decodeURI(path); - if (path.lastIndexOf('/') == path.length - 1 || path.lastIndexOf('\\') == path.length - 1) { if ( has_capability(self.data_cap, 'select_folder') @@ -1417,12 +1416,12 @@ pgAdmin.FileUtils = { // we remove simple file upload element $('.file-input-container').remove(); $('.upload').remove(); - $( ".create" ).before( ' ' ); + $( ".create" ).before( ' ' ); $('#uploader .upload').unbind().click(function() { // we create prompt var msg = '
' + - '' + + '' + '
' + '
' + lg.file_size_limit + config.upload.fileSizeLimit + ' ' + lg.mb + '.
', diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/index.html b/web/pgadmin/misc/file_manager/templates/file_manager/index.html index 4d24296..064a128 100755 --- a/web/pgadmin/misc/file_manager/templates/file_manager/index.html +++ b/web/pgadmin/misc/file_manager/templates/file_manager/index.html @@ -6,28 +6,33 @@
- - + disabled tabindex="2"> +
- - + - - - - + class="btn fa fa-folder-open create" tabindex="8"> + +
@@ -41,15 +46,15 @@
{{ _('Are you sure you want to delete this item?') }} - - + +
{{ _('Are you sure you want to replace this file?') }} - - + +
@@ -57,6 +62,7 @@ require(['sources/generated/file_utils'], function() { pgAdmin.FileUtils.init(); }); + setTimeout(function(){ $('#file-input-path').focus(); }, 1000);