Show name of template for invisible templates

Soft dependency on Id842389d in core.

Bug: T141861
Change-Id: I24f100dde387549a735ebd93e1c9a21f59f52170
This commit is contained in:
Ed Sanders 2016-08-02 11:43:17 +01:00 committed by Jforrester
parent d9d7aec0b0
commit 4ae7bc6a31
2 changed files with 26 additions and 14 deletions

View file

@ -116,6 +116,19 @@ ve.ce.MWTransclusionNode.static.filterRendering = function ( contentNodes ) {
/* Methods */
/**
* @inheritdoc
*/
ve.ce.MWTransclusionNode.prototype.createInvisibleIcon = function () {
var icon = new OO.ui.ButtonWidget( {
classes: [ 've-ce-focusableNode-invisibleIcon' ],
framed: false,
icon: this.constructor.static.iconWhenInvisible,
label: this.constructor.static.getDescription( this.getModel() )
} );
return icon.$element;
};
/**
* @inheritdoc
*/
@ -162,6 +175,14 @@ ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( deferred, respons
ve.ce.MWTransclusionNode.prototype.render = function ( generatedContents ) {
// Call parent mixin
ve.ce.GeneratedContentNode.prototype.render.call( this, generatedContents );
};
/**
* @inheritdoc
*/
ve.ce.MWTransclusionNode.prototype.onSetup = function () {
// Parent method
ve.ce.MWTransclusionNode.super.prototype.onSetup.apply( this, arguments );
// Render replaces this.$element with a new node so re-add classes
this.$element.addClass( 've-ce-mwTransclusionNode' );

View file

@ -5,20 +5,11 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ce-mwTransclusionNode.oo-ui-iconElement {
display: inline-block;
vertical-align: middle;
padding: 0.2em;
margin: -0.25em 0.15em 0 0.15em;
.ve-ce-mwTransclusionNode > .ve-ce-focusableNode-invisibleIcon.oo-ui-iconElement {
font-size: 0.914286em;
width: auto;
}
.ve-ce-mwTransclusionNode.oo-ui-iconElement .oo-ui-iconElement-icon {
display: inline-block;
vertical-align: middle;
width: 1.25em;
height: 1.25em;
background-repeat: no-repeat;
background-position: center center;
background-size: 24px 24px; /* stylelint-disable-line no-unsupported-browser-features */
opacity: 0.5;
.ve-ce-mwTransclusionNode.ve-ce-focusableNode-invisible {
width: auto;
}