Merge "Toggle trash button (on transclusion dialog) visibility when changing to non-parameter pages"

This commit is contained in:
jenkins-bot 2014-08-27 21:28:33 +00:00 committed by Gerrit Code Review
commit 7be69944d6

View file

@ -151,9 +151,10 @@ ve.ui.MWTransclusionDialog.prototype.onBookletLayoutSet = function ( page ) {
this.addParameterButton.setDisabled(
!( page instanceof ve.ui.MWTemplatePage || page instanceof ve.ui.MWParameterPage )
);
if ( page instanceof ve.ui.MWParameterPage ) {
this.bookletLayout.getOutlineControls().removeButton.toggle( !page.parameter.isRequired() );
}
this.bookletLayout.getOutlineControls().removeButton.toggle( !(
page instanceof ve.ui.MWParameterPage &&
page.parameter.isRequired()
) );
};
/**