From 809dbef78988ab4ceb59cb0da30b6e65d38543ac Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 27 Apr 2017 10:26:42 +0200 Subject: [PATCH] Don't show warning dialog message as dialog title issue6369 review30161002 --- src/common.js | 15 ++++++++++----- src/rpc.js | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/common.js b/src/common.js index 56a7e118d8..9608c2bdf9 100644 --- a/src/common.js +++ b/src/common.js @@ -2678,8 +2678,7 @@ build_dialog: function(message, title, prm) { var dialog = Sao.common.WarningDialog._super.build_dialog.call( this); - dialog.add_title(title); - dialog.body.append(jQuery('
', { + var content = jQuery('
', { 'class': 'alert alert-warning', role: 'alert' }).append(jQuery('', { @@ -2688,9 +2687,15 @@ })).append(jQuery('', { 'class': 'sr-only' }).append(Sao.i18n.gettext('Warning: ')) - ).append(jQuery('') - .append(message) - .css('white-space', 'pre-wrap'))); + ).append(jQuery('

') + .append(title) + .css('white-space', 'pre-wrap')); + if (message) { + content.append(jQuery('') + .append(message) + .css('white-space', 'pre-wrap')); + } + dialog.body.append(content); jQuery('