diff --git a/sao/src/common.js b/sao/src/common.js index 709d1940a6..f6dff83cb5 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -3547,24 +3547,38 @@ Sao.common.ErrorDialog = Sao.class_(Sao.common.UniqueDialog, { class_: 'error-dialog', - size: 'lg', + size: 'md', build_dialog: function(title, details, prm) { var dialog = Sao.common.ConcurrencyDialog._super.build_dialog.call( this); dialog.add_title(Sao.i18n.gettext('Application Error')); - dialog.body.append(jQuery('
', { + const alert_ = jQuery('
', { 'class': 'alert alert-danger', role: 'alert' - }).append(jQuery('

') - .append(jQuery('

')
-                    .text(details)))
-                .append(jQuery('

') - .append(jQuery('', { - 'class': 'btn btn-link', - href: Sao.config.bug_url, - target: '_blank', - rel: 'noreferrer noopener', - }).text(Sao.i18n.gettext('Report Bug'))))); + }).appendTo(dialog.body); + alert_.append(jQuery('

') + .text(title) + .css('white-space', 'pre-wrap')); + alert_.append(jQuery('

').append(jQuery('', { + 'class': 'btn btn-default', + role: 'button', + 'data-toggle': 'collapse', + 'data-target': '#error-detail', + 'aria-expanded': false, + 'aria-controls': '#error-detail', + }).text(Sao.i18n.gettext("Details")))); + alert_.append(jQuery('

', { + 'class': 'collapse', + id: 'error-detail', + }).append(jQuery('

', {
+                'class': 'pre-scrollable',
+            }).text(details)));
+            jQuery('', {
+                'class': 'btn btn-link',
+                href: Sao.config.bug_url,
+                target: '_blank',
+                rel: 'noreferrer noopener',
+            }).text(Sao.i18n.gettext('Report Bug')).appendTo(dialog.footer);
             jQuery('