diff --git a/src/common.js b/src/common.js index 2b8441a4ca..853f2254e4 100644 --- a/src/common.js +++ b/src/common.js @@ -2247,7 +2247,7 @@ .append(jQuery('').text('Always ignore this warning.')) ); dialog.body.append(jQuery('
').text('Do you want to proceed?')); - footer.children().remove(); + dialog.footer.children().remove(); jQuery('', { 'class': 'btn btn-link' }).append('No').click(function() { @@ -2318,7 +2318,7 @@ }).append('Cancel').click(function() { this.close(dialog); prm.resolve('cancel'); - }.bind(this)).appendTo(footer); + }.bind(this)).appendTo(dialog.footer); jQuery('', { 'class': 'btn btn-default' }).append('No').click(function() { @@ -2381,7 +2381,7 @@ build_dialog: function(model, record_id, context, prm) { var dialog = Sao.common.ConcurrencyDialog._super.build_dialog.call( this); - dialog.find('.modal-dialog' + dialog.modal.find('.modal-dialog' ).removeClass('modal-sm').addClass('modal-lg'); dialog.add_title('Concurrency Exception'); dialog.body.append(jQuery('', { @@ -2440,7 +2440,7 @@ build_dialog: function(title, details, prm) { var dialog = Sao.common.ConcurrencyDialog._super.build_dialog.call( this); - dialog.find('.modal-dialog' + dialog.modal.find('.modal-dialog' ).removeClass('modal-sm').addClass('modal-lg'); dialog.add_title('Application Error'); dialog.body.append(jQuery('', { diff --git a/src/sao.js b/src/sao.js index f0d47a9e42..1787a61986 100644 --- a/src/sao.js +++ b/src/sao.js @@ -251,31 +251,31 @@ var Sao = {}; init: function(title, class_, size) { size = size || 'sm'; this.modal = jQuery('', { - 'class': class_ + 'modal fade', + 'class': class_ + ' modal fade', 'role': 'dialog' }); this.content = jQuery('', { 'class': 'modal-content' }).appendTo(jQuery('', { 'class': 'modal-dialog modal-' + size - }).appendTo(dialog)); + }).appendTo(this.modal)); this.header = jQuery('', { 'class': 'modal-header' - }).appendTo(content); + }).appendTo(this.content); if (title) { this.add_title(title); } this.body = jQuery('', { 'class': 'modal-body' - }).appendTo(content); + }).appendTo(this.content); this.footer = jQuery('', { 'class': 'modal-footer' - }).appendTo(content); + }).appendTo(this.content); }, add_title: function(title) { this.header.append(jQuery('', { 'class': 'modal-title' - }).content(title)); + }).append(title)); } }); diff --git a/src/wizard.js b/src/wizard.js index 638ea05c3c..edf4ac2d80 100644 --- a/src/wizard.js +++ b/src/wizard.js @@ -204,6 +204,7 @@ Sao.Wizard.Dialog._super.init.call(this); var dialog = new Sao.Dialog(name, 'wizard-dialog', 'lg'); this.dialog = dialog.modal; + this.content = dialog.content; this.footer = dialog.footer; dialog.body.append(this.widget); },