diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
index c5335cc89..0e081817a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
@@ -1056,16 +1056,16 @@ class IndexesView(PGChildNodeView, SchemaDiffObjectCompare):
create_req = False
for key in required_create_keys:
- if key in diff_dict:
- if (key == 'columns' and ((
- 'added' in diff_dict[key] and
- len(diff_dict[key]['added']) > 0
- ) or ('changed' in diff_dict[key] and
- len(diff_dict[key]['changed']) > 0) or (
- 'deleted' in diff_dict[key] and
- len(diff_dict[key]['deleted']) > 0)
- )) or key != 'columns':
- create_req = True
+ if key in diff_dict and \
+ ((key == 'columns' and
+ (('added' in diff_dict[key] and
+ len(diff_dict[key]['added']) > 0) or
+ ('changed' in diff_dict[key] and
+ len(diff_dict[key]['changed']) > 0) or
+ ('deleted' in diff_dict[key] and
+ len(diff_dict[key]['deleted']) > 0))) or
+ key != 'columns'):
+ create_req = True
if create_req:
diff = self.get_sql_from_index_diff(sid=src_params['sid'],
diff --git a/web/pgadmin/browser/static/js/error.js b/web/pgadmin/browser/static/js/error.js
index 911234193..ad2d07133 100644
--- a/web/pgadmin/browser/static/js/error.js
+++ b/web/pgadmin/browser/static/js/error.js
@@ -17,32 +17,30 @@ define(
title = _.escape(title);
message = _.escape(message);
info = _.escape(info);
- let text = '
\
-
';
+ let text ='
'
+ + '
'
+ + '
'
+ + '
'
+ + '
' + message + '
'
+ + '
'
+ + '
';
if (info != null && info != '') {
- text += '
\
-
';
+ text += '
'
+ + '
'
+ + '
'
+ + '
' + info + '
'
+ + '
'
+ + '
'
+ + '
';
}
text += '';
diff --git a/web/pgadmin/static/js/alertify.pgadmin.defaults.js b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
index aea2ad0dd..6da93bcf1 100644
--- a/web/pgadmin/static/js/alertify.pgadmin.defaults.js
+++ b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
@@ -60,9 +60,8 @@ define([
},
// listen and respond to changes in dialog settings.
settingUpdated: function(key, oldValue, newValue) {
- switch (key) {
- case 'pg_msg':
- var doc = iframe.contentWindow || iframe.contentDocument;
+ if(key === 'pg_msg') {
+ let doc = iframe.contentWindow || iframe.contentDocument;
if (doc.document) {
doc = doc.document;
}
@@ -70,8 +69,6 @@ define([
doc.open();
doc.write(newValue);
doc.close();
-
- break;
}
},
// listen to internal dialog events.
@@ -79,8 +76,7 @@ define([
// triggered when a dialog option gets update.
// warning! this will not be triggered for settings updates.
onupdate: function(option, oldValue, newValue) {
- switch (option) {
- case 'resizable':
+ if(option === 'resizable') {
if (newValue) {
this.elements.content.removeAttribute('style');
iframe && iframe.removeAttribute('style');
@@ -88,7 +84,6 @@ define([
this.elements.content.style.minHeight = 'inherit';
iframe && (iframe.style.minHeight = 'inherit');
}
- break;
}
},
},
@@ -124,13 +119,13 @@ define([
if (contentType.indexOf('text/html') == 0) {
var alertMessage = promptmsg;
if (type === 'error') {
- alertMessage = '\
- \
-
\
-
' + promptmsg + '
\
-
' + gettext('Click for details.') + '
\
-
\
-
';
+ alertMessage =
+ ''
+ + '
'
+ + '
' + promptmsg + '
'
+ + '
' + gettext('Click for details.') + '
'
+ + '
'
+ + '
';
}
alertify.notify(
@@ -173,13 +168,13 @@ define([
}
}
if (contentType.indexOf('text/html') >= 0) {
- var alertMessage = '\
- \
-
\
-
' + gettext('INTERNAL SERVER ERROR') + '
\
-
' + gettext('Click for details.') + '
\
-
\
-
';
+ var alertMessage =
+ ''
+ + '
'
+ + '
' + gettext('INTERNAL SERVER ERROR') + '
'
+ + '
' + gettext('Click for details.') + '
'
+ + '
'
+ + '
';
alertify.notify(
alertMessage, 'error', 0, () => {
diff --git a/web/pgadmin/tools/import_export/static/js/import_export.js b/web/pgadmin/tools/import_export/static/js/import_export.js
index e8cad1012..3c4ce652e 100644
--- a/web/pgadmin/tools/import_export/static/js/import_export.js
+++ b/web/pgadmin/tools/import_export/static/js/import_export.js
@@ -581,15 +581,12 @@ define([
// triggered when a dialog option gets update.
onupdate: function(option, oldValue, newValue) {
-
- switch (option) {
- case 'resizable':
+ if(option === 'resizable') {
if (newValue) {
this.elements.content.removeAttribute('style');
} else {
this.elements.content.style.minHeight = 'inherit';
}
- break;
}
},