1 Demo.LongProcessDialog = function DemoLongProcessDialog( config ) {
2 Demo.LongProcessDialog.parent.call( this, config );
4 OO.inheritClass( Demo.LongProcessDialog, OO.ui.ProcessDialog );
5 Demo.LongProcessDialog.static.title = 'Process dialog';
6 Demo.LongProcessDialog.static.actions = [
7 { action: 'save', label: 'Done', flags: [ 'primary', 'progressive' ] },
8 { action: 'cancel', label: 'Cancel', flags: [ 'safe', 'back' ] },
9 { action: 'other', label: 'Other', flags: 'other' }
11 Demo.LongProcessDialog.prototype.initialize = function () {
14 Demo.LongProcessDialog.parent.prototype.initialize.apply( this, arguments );
15 this.content = new OO.ui.PanelLayout( { padded: true, expanded: false } );
16 for ( i = 0; i < 100; i++ ) {
17 this.content.$element.append( '<p>Dialog content</p>' );
19 this.$body.append( this.content.$element );
21 Demo.LongProcessDialog.prototype.getActionProcess = function ( action ) {
24 return new OO.ui.Process( function () {
25 dialog.close( { action: action } );
28 return Demo.LongProcessDialog.parent.prototype.getActionProcess.call( this, action );
30 Demo.LongProcessDialog.prototype.getBodyHeight = function () {
31 return this.content.$element.outerHeight( true );