mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-15 03:44:02 +00:00
79521f89cf
Bug: T312309 Depends-On: I9c3035c9dbe7545a05efb2286dffe0145d3557b4 Change-Id: I9d74914ddbcc9def74e85106a68574a807b0b731
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
function LedeSectionDialog() {
|
|
// Parent constructor
|
|
LedeSectionDialog.super.apply( this, arguments );
|
|
}
|
|
|
|
/* Inheritance */
|
|
OO.inheritClass( LedeSectionDialog, OO.ui.ProcessDialog );
|
|
|
|
LedeSectionDialog.static.name = 'ledeSection';
|
|
|
|
LedeSectionDialog.static.size = 'larger';
|
|
|
|
LedeSectionDialog.static.title = OO.ui.deferMsg( 'discussiontools-ledesection-title' );
|
|
|
|
LedeSectionDialog.static.actions = [
|
|
{
|
|
label: OO.ui.deferMsg( 'visualeditor-dialog-action-done' ),
|
|
flags: [ 'safe', 'close' ]
|
|
}
|
|
];
|
|
|
|
LedeSectionDialog.prototype.initialize = function () {
|
|
// Parent method
|
|
LedeSectionDialog.super.prototype.initialize.call( this );
|
|
|
|
this.contentLayout = new OO.ui.PanelLayout( {
|
|
scrollable: true,
|
|
padded: true,
|
|
expanded: false,
|
|
classes: [ 'ext-discussiontools-ui-ledeSectionDialog-content', 'mw-parser-output', 'content' ]
|
|
} );
|
|
|
|
this.$body.append( this.contentLayout.$element );
|
|
};
|
|
|
|
LedeSectionDialog.prototype.getSetupProcess = function ( data ) {
|
|
return LedeSectionDialog.super.prototype.getSetupProcess.call( this, data )
|
|
.next( function () {
|
|
this.contentLayout.$element.empty().append( data.$content );
|
|
}, this );
|
|
};
|
|
|
|
module.exports = LedeSectionDialog;
|