mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
Disable parameter add icon when there's no transclusion parts
Would put this code in onBookletLayoutSet, but that doesn't appear to be getting called in this case. Have to detect whether or not we should be changing the disabled status, rather than just setting it straight away, which would break every other case where onBookletLayoutSet is called. Bug: 63158 Change-Id: I6f62479291424d9b2ee0e42481dec9d085169c63
This commit is contained in:
parent
50e59f328a
commit
d128378f5a
|
@ -165,6 +165,10 @@ ve.ui.MWTransclusionDialog.prototype.onReplacePart = function ( removed, added )
|
||||||
|
|
||||||
ve.ui.MWTransclusionDialog.super.prototype.onReplacePart.call( this, removed, added );
|
ve.ui.MWTransclusionDialog.super.prototype.onReplacePart.call( this, removed, added );
|
||||||
|
|
||||||
|
if ( this.transclusionModel.getParts().length === 0 ) {
|
||||||
|
this.addParameterButton.setDisabled( true );
|
||||||
|
}
|
||||||
|
|
||||||
single = this.isSingleTemplateTransclusion();
|
single = this.isSingleTemplateTransclusion();
|
||||||
label = ve.msg( 'visualeditor-dialog-action-insert' );
|
label = ve.msg( 'visualeditor-dialog-action-insert' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue