diff --git a/docs/en_US/release_notes_4_30.rst b/docs/en_US/release_notes_4_30.rst index 117ddfc37..6ea76d7da 100644 --- a/docs/en_US/release_notes_4_30.rst +++ b/docs/en_US/release_notes_4_30.rst @@ -32,6 +32,7 @@ Bug fixes | `Issue #6058 `_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool. | `Issue #6061 `_ - Fixed extra parentheses issue around joins for Views. | `Issue #6065 `_ - Fixed accessibility issues in schema diff module. +| `Issue #6069 `_ - Fixed an issue on refreshing files in Query Tool. | `Issue #6077 `_ - Fixed accessibility issues in various dialogs. | `Issue #6084 `_ - Fixed TypeError exception in schema diff when selected any identical object. | `Issue #6096 `_ - Updated deployment documentation, refer correctly to uWSGI where Gunicorn had been referenced. diff --git a/web/pgadmin/misc/file_manager/static/js/create_dialogue.js b/web/pgadmin/misc/file_manager/static/js/create_dialogue.js index 41c58f5c9..fa08ea560 100644 --- a/web/pgadmin/misc/file_manager/static/js/create_dialogue.js +++ b/web/pgadmin/misc/file_manager/static/js/create_dialogue.js @@ -137,45 +137,51 @@ module.exports = Alertify.dialog('createModeDlg', function() { return permission; }, callback: function(closeEvent) { + closeEvent.cancel = false; if (closeEvent.button.text == gettext('Create')) { - var newFile = $('.storage_dialog #uploader .input-path').val(), - file_data = { - 'path': $('.currentpath').val(), - }, - innerbody, - ext = $('.allowed_file_types select').val(); + var act_variable = document.activeElement.id; + if(act_variable != 'refresh_list') { + var newFile = $('.storage_dialog #uploader .input-path').val(), + file_data = { + 'path': $('.currentpath').val(), + }, + innerbody, + ext = $('.allowed_file_types select').val(); - /* - Add the file extension if necessary, and if the file type selector - isn't set to "All Files". If there's no . at all in the path, or - there is a . already but it's not following the last /, AND the - extension isn't *, then we add the extension. - */ - if ((!newFile.includes('.') || - newFile.split('.').pop() != ext) && - ext != '*') { - newFile = newFile + '.' + ext; - $('.storage_dialog #uploader .input-path').val(newFile); - } + /* + Add the file extension if necessary, and if the file type selector + isn't set to "All Files". If there's no . at all in the path, or + there is a . already but it's not following the last /, AND the + extension isn't *, then we add the extension. + */ + if ((!newFile.includes('.') || + newFile.split('.').pop() != ext) && + ext != '*') { + newFile = newFile + '.' + ext; + $('.storage_dialog #uploader .input-path').val(newFile); + } - if (!this.check_permission(newFile)) { - closeEvent.cancel = true; - return; - } + if (!this.check_permission(newFile)) { + closeEvent.cancel = true; + return; + } - if (!_.isUndefined(newFile) && newFile !== '' && this.is_file_exist()) { - this.replace_file(); - this.$container.find('.replace_file').find('.btn_yes').trigger('focus'); - closeEvent.cancel = true; + if (!_.isUndefined(newFile) && newFile !== '' && this.is_file_exist()) { + this.replace_file(); + this.$container.find('.replace_file').find('.btn_yes').trigger('focus'); + closeEvent.cancel = true; + } else { + pgAdmin.Browser.Events.trigger('pgadmin-storage:finish_btn:create_file', newFile); + innerbody = $(this.elements.body).find('.storage_content'); + $(innerbody).find('*').off(); + innerbody.remove(); + removeTransId(this.trans_id); + } + + set_last_traversed_dir(file_data, this.trans_id); } else { - pgAdmin.Browser.Events.trigger('pgadmin-storage:finish_btn:create_file', newFile); - innerbody = $(this.elements.body).find('.storage_content'); - $(innerbody).find('*').off(); - innerbody.remove(); - removeTransId(this.trans_id); + closeEvent.cancel = true; } - - set_last_traversed_dir(file_data, this.trans_id); } else if (closeEvent.button.text == gettext('Cancel')) { innerbody = $(this.elements.body).find('.storage_content'); $(innerbody).find('*').off(); diff --git a/web/pgadmin/misc/file_manager/static/js/select_dialogue.js b/web/pgadmin/misc/file_manager/static/js/select_dialogue.js index b3123f915..d80f98b4e 100644 --- a/web/pgadmin/misc/file_manager/static/js/select_dialogue.js +++ b/web/pgadmin/misc/file_manager/static/js/select_dialogue.js @@ -108,21 +108,26 @@ module.exports = Alertify.dialog('fileSelectionDlg', function() { }, callback: function(closeEvent) { var innerbody; - + closeEvent.cancel = false; if (closeEvent.button.text == gettext('Select')) { - var newFile = $('.storage_dialog #uploader .input-path').val(), - file_data = { - 'path': $('.currentpath').val(), - }; + var act_variable = document.activeElement.id; + if(act_variable !='refresh_list') { + var newFile = $('.storage_dialog #uploader .input-path').val(), + file_data = { + 'path': $('.currentpath').val(), + }; - pgAdmin.Browser.Events.trigger('pgadmin-storage:finish_btn:' + this.dialog_type, newFile); - innerbody = $(this.elements.body).find('.storage_content'); - $(innerbody).find('*').off(); - innerbody.remove(); - removeTransId(this.trans_id); - // Ajax call to store the last directory visited once user press select button + pgAdmin.Browser.Events.trigger('pgadmin-storage:finish_btn:' + this.dialog_type, newFile); + innerbody = $(this.elements.body).find('.storage_content'); + $(innerbody).find('*').off(); + innerbody.remove(); + removeTransId(this.trans_id); + // Ajax call to store the last directory visited once user press select button - set_last_traversed_dir(file_data, this.trans_id); + set_last_traversed_dir(file_data, this.trans_id); + } else { + closeEvent.cancel = true; + } } else if (closeEvent.button.text == gettext('Cancel')) { innerbody = $(this.elements.body).find('.storage_content'); $(innerbody).find('*').off(); diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js index 59f672598..7e335ee84 100644 --- a/web/pgadmin/misc/file_manager/static/js/utility.js +++ b/web/pgadmin/misc/file_manager/static/js/utility.js @@ -1584,12 +1584,14 @@ define([ if (config.options.dialog_type == 'create_file') { var status = checkPermission(path); if (status) { - $('.file_manager').trigger('enter-key'); + //$('.file_manager').trigger('enter-key'); + $('.file_manager_ok').trigger('click'); } } else if (config.options.dialog_type == 'select_file') { var file_status = getFileInfo(path); if (file_status) { - $('.file_manager').trigger('enter-key'); + $('.file_manager_ok').trigger('click'); + //$('.file_manager').trigger('enter-key'); } } } 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 b914c4444..6ceefa6da 100644 --- a/web/pgadmin/misc/file_manager/templates/file_manager/index.html +++ b/web/pgadmin/misc/file_manager/templates/file_manager/index.html @@ -25,7 +25,7 @@