Don't show warning dialog message as dialog title

issue6369
review30161002
This commit is contained in:
Sergi Almacellas Abellana
2017-04-27 10:26:42 +02:00
parent 376a67fd06
commit 809dbef789
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -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('<div/>', {
var content = jQuery('<div/>', {
'class': 'alert alert-warning',
role: 'alert'
}).append(jQuery('<span/>', {
@@ -2688,9 +2687,15 @@
})).append(jQuery('<span/>', {
'class': 'sr-only'
}).append(Sao.i18n.gettext('Warning: '))
).append(jQuery('<span/>')
.append(message)
.css('white-space', 'pre-wrap')));
).append(jQuery('<h4/>')
.append(title)
.css('white-space', 'pre-wrap'));
if (message) {
content.append(jQuery('<span/>')
.append(message)
.css('white-space', 'pre-wrap'));
}
dialog.body.append(content);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
+1 -1
View File
@@ -63,7 +63,7 @@
} else if (data.error[0] == 'UserError') {
msg = data.error[1][0];
description = data.error[1][1];
Sao.common.warning.run(msg, description)
Sao.common.warning.run(description, msg)
.always(dfd.reject);
return;
} else if (data.error[0] == 'ConcurrencyException') {