Fixed an issue where the state of the Save File icon does not match the dirty editor indicator. Fixes

This commit is contained in:
Nikhil Mohite 2020-12-17 11:37:03 +05:30 committed by Akshay Joshi
parent cb0a914099
commit a7b8d77ed7
2 changed files with 9 additions and 1 deletions
docs/en_US
web/pgadmin/tools/sqleditor/static/js

View File

@ -21,5 +21,6 @@ Bug fixes
| `Issue #5875 <https://redmine.postgresql.org/issues/5875>`_ - Ensure that the 'template1' database should not be visible after pg_upgrade.
| `Issue #5965 <https://redmine.postgresql.org/issues/5965>`_ - Ensure that the macro query result should be download properly.
| `Issue #6046 <https://redmine.postgresql.org/issues/6046>`_ - Fixed an issue where the state of the Save File icon does not match the dirty editor indicator.
| `Issue #6047 <https://redmine.postgresql.org/issues/6047>`_ - Fixed an issue where the dirty indicator stays active even if all changes were undone.
| `Issue #6058 <https://redmine.postgresql.org/issues/6058>`_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool.

View File

@ -4286,7 +4286,14 @@ define('tools.querytool', [
$('#btn-explain-options-dropdown').prop('disabled', mode_disabled);
$('#btn-edit-dropdown').prop('disabled', mode_disabled);
$('#btn-load-file').prop('disabled', mode_disabled);
$('#btn-save-file').prop('disabled', mode_disabled);
if(this.gridView.current_file) {
if(this.gridView.query_tool_obj.file_data != this.gridView.query_tool_obj.getValue()) {
$('#btn-save-file').prop('disabled', mode_disabled);
}
} else {
$('#btn-save-file').prop('disabled', mode_disabled);
}
$('#btn-file-menu-dropdown').prop('disabled', mode_disabled);
$('#btn-find').prop('disabled', mode_disabled);
$('#btn-find-menu-dropdown').prop('disabled', mode_disabled);