mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-09 12:38:35 -05:00
Fixed errors related to HTML tags shown in the error message for JSON editor. Fixes #6668
This commit is contained in:
committed by
Akshay Joshi
parent
092f830c3c
commit
51d73b1672
+1
-1
@@ -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.*",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user