diff --git a/docs/en_US/release_notes_5_7.rst b/docs/en_US/release_notes_5_7.rst index 53022fb40..c551235c4 100644 --- a/docs/en_US/release_notes_5_7.rst +++ b/docs/en_US/release_notes_5_7.rst @@ -30,6 +30,7 @@ Bug fixes | `Issue #6572 `_ - Partially fixes the data output panel display issue. | `Issue #6641 `_ - Enables pgAdmin to retrieve user permissions in case of nested roles which helps to terminate the session for AWS RDS. | `Issue #6663 `_ - Fixed no attribute '_asdict' error when connecting the database server. +| `Issue #6668 `_ - Fixed errors related to HTML tags shown in the error message for JSON editor. | `Issue #6671 `_ - Fixed UnboundLocalError where local variable 'user_id' referenced before assignment. | `Issue #6682 `_ - Renamed 'Auto rollback?' to 'Auto rollback on error?'. | `Issue #6684 `_ - Fixed the JSON editor issue of hiding the first record. diff --git a/web/package.json b/web/package.json index 7fa2f7c3f..931df772a 100644 --- a/web/package.json +++ b/web/package.json @@ -100,7 +100,7 @@ "jquery-contextmenu": "^2.9.2", "jquery-ui": "^1.12.1", "json-bignumber": "^1.0.1", - "jsoneditor": "^9.5.1", + "jsoneditor": "^9.5.4", "karma-coverage": "^2.0.3", "leaflet": "^1.5.1", "lodash": "4.*", diff --git a/web/pgadmin/static/js/slickgrid/editors.js b/web/pgadmin/static/js/slickgrid/editors.js index 4ca2c05b6..e2e6cd2c9 100644 --- a/web/pgadmin/static/js/slickgrid/editors.js +++ b/web/pgadmin/static/js/slickgrid/editors.js @@ -396,7 +396,10 @@ import Alertify from 'pgadmin.alertifyjs'; var jsonContainer = document.getElementById('pg-json-editor'); var options = { modes: ['code', 'form', 'tree','preview'], - onError: function (){ Alertify.error(gettext('Please fix errors in json contents before switching mode.'));} + onError: function (error){ + var msg = 'Invalid Json: ' + error.message.split(':')[0]; + Alertify.error(gettext(msg)); + } }; $editor = new JSONEditor(jsonContainer, options); $editor.setText(data); @@ -415,7 +418,10 @@ import Alertify from 'pgadmin.alertifyjs'; var jsonContainer = document.getElementById('pg-json-editor'); var options = { modes: ['code', 'form', 'tree','preview'], - onError: function (){Alertify.error(gettext('Please fix errors in json contents before switching mode.'));} + onError: function (error){ + var msg = 'Invalid Json: ' + error.message.split(':')[0]; + Alertify.error(gettext(msg)); + } }; if(jsonContainer) { $editor = new JSONEditor(jsonContainer, options); diff --git a/web/pgadmin/static/scss/_jsoneditor.overrides.scss b/web/pgadmin/static/scss/_jsoneditor.overrides.scss index 21938413e..93c1d1feb 100644 --- a/web/pgadmin/static/scss/_jsoneditor.overrides.scss +++ b/web/pgadmin/static/scss/_jsoneditor.overrides.scss @@ -93,6 +93,8 @@ } /* Mode drop-down */ +.jsoneditor-menu>.jsoneditor-modes>button:active, +.jsoneditor-menu>.jsoneditor-modes>button:focus, .jsoneditor-menu>.jsoneditor-modes>button,{ font-family: $font-family-primary !important; font-size: $font-size-base !important; diff --git a/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss b/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss index 93aece607..5d34b8801 100644 --- a/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss +++ b/web/pgadmin/tools/sqleditor/static/scss/_sqleditor.scss @@ -303,7 +303,7 @@ li.CodeMirror-hint-active { & #pg-json-editor { min-width:525px; - min-height:280px; + min-height:300px; height:295px; width:550px; border: $panel-border;