mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Make button to add undocumented template parameter work
Thanks to the widget now being an actual ButtonElement. Bug: T274544 Change-Id: I1b0ef28b0aa115a027a07f3ae53c583598483e96
This commit is contained in:
parent
11978b968d
commit
198c5dba77
|
@ -38,7 +38,8 @@ ve.ui.MWTransclusionOutlineTemplateWidget = function VeUiMWTransclusionOutlineTe
|
|||
var addParameterButton = new ve.ui.MWTransclusionOutlineButtonWidget( {
|
||||
icon: 'parameter',
|
||||
label: ve.msg( 'visualeditor-dialog-transclusion-add-param' )
|
||||
} );
|
||||
} )
|
||||
.connect( this, { click: 'onAddParameterButtonClick' } );
|
||||
|
||||
this.parameters = new OO.ui.FieldsetLayout( {
|
||||
items: checkboxes
|
||||
|
@ -131,3 +132,7 @@ ve.ui.MWTransclusionOutlineTemplateWidget.prototype.onCheckboxChange = function
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
ve.ui.MWTransclusionOutlineTemplateWidget.prototype.onAddParameterButtonClick = function () {
|
||||
this.templateModel.addParameter( new ve.dm.MWParameterModel( this.templateModel ) );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue