1 Demo.SimpleDialog = function DemoSimpleDialog( config ) {
2 Demo.SimpleDialog.parent.call( this, config );
4 OO.inheritClass( Demo.SimpleDialog, OO.ui.Dialog );
5 Demo.SimpleDialog.static.title = 'Simple dialog';
6 Demo.SimpleDialog.prototype.initialize = function () {
10 Demo.SimpleDialog.parent.prototype.initialize.apply( this, arguments );
11 this.content = new OO.ui.PanelLayout( { padded: true, expanded: false } );
12 this.content.$element.append( '<p>Dialog content</p>' );
14 closeButton = new OO.ui.ButtonWidget( {
15 label: OO.ui.msg( 'ooui-dialog-process-dismiss' )
17 closeButton.on( 'click', function () {
21 this.content.$element.append( closeButton.$element );
22 this.$body.append( this.content.$element );
24 Demo.SimpleDialog.prototype.getBodyHeight = function () {
25 return this.content.$element.outerHeight( true );