From 06ae799d0285dca9f5bdb0e01d4f4b6f48bfa7f1 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Fri, 18 Jan 2019 17:54:49 +0530 Subject: [PATCH] Handle text wrapping in alertify dialog only when it is required. Regression of #3695 --- web/pgadmin/preferences/static/js/preferences.js | 4 ++-- web/pgadmin/static/js/alertify.pgadmin.defaults.js | 1 + web/pgadmin/static/scss/_alertify.overrides.scss | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/pgadmin/preferences/static/js/preferences.js b/web/pgadmin/preferences/static/js/preferences.js index 88a50bd15..0c2a626d6 100644 --- a/web/pgadmin/preferences/static/js/preferences.js +++ b/web/pgadmin/preferences/static/js/preferences.js @@ -375,9 +375,9 @@ define('pgadmin.preferences', [ dialogContentCleanup(); $container.append( - '
' + '
' ).append( - '
' + + '
' + gettext('Category is not selected.') + '
' ); diff --git a/web/pgadmin/static/js/alertify.pgadmin.defaults.js b/web/pgadmin/static/js/alertify.pgadmin.defaults.js index 0002183f7..b93d49fb9 100644 --- a/web/pgadmin/static/js/alertify.pgadmin.defaults.js +++ b/web/pgadmin/static/js/alertify.pgadmin.defaults.js @@ -430,6 +430,7 @@ define([ onshow:function() { $(this.elements.commands.close).attr('title', gettext('Close')); $(this.elements.commands.maximize).attr('title', gettext('Maximize')); + $(this.elements.content).addClass('ajs-wrap-text'); }, reverseButtons: true, }); diff --git a/web/pgadmin/static/scss/_alertify.overrides.scss b/web/pgadmin/static/scss/_alertify.overrides.scss index b856e0b19..523d55ba6 100644 --- a/web/pgadmin/static/scss/_alertify.overrides.scss +++ b/web/pgadmin/static/scss/_alertify.overrides.scss @@ -53,10 +53,11 @@ } .ajs-body .ajs-content { bottom: $footer-height-calc !important; - word-break: break-word; + } + .ajs-wrap-text { + word-break: break-all; word-wrap: break-word; } - /* Removes padding from alertify footer */ .ajs-footer { padding: 0;