Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This leads to the button to become disabled when the page is rendered but with subsequent additions it does not become clickable.
ve.ui.MWTransclusionDialog.prototype.getPageFromPart = function ( part ) {
var page = ve.ui.MWTransclusionDialog.super.prototype.getPageFromPart.call( this, part );
if ( !page && part instanceof ve.dm.MWTransclusionContentModel ) {
return new ve.ui.MWTransclusionContentPage( part, part.getId(), { $: this.$ } );
}
var parts = this.transclusionModel.getParts();
if(parts.length === 1 && part instanceof ve.dm.MWTemplatePlaceholderModel)
{
page.removeButton.setDisabled( true );
}
return page;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.