mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-05 03:08:37 +00:00
7f4645bbe0
Generally the default button margin on the parts is 24px. The only exception are the placeholder and wikitext when they are the last parts in the outline. Bug: T312644 Change-Id: Ie513bf1c022b2696cc92aacbbca59ddf6e55043e
28 lines
886 B
JavaScript
28 lines
886 B
JavaScript
/**
|
|
* Sidebar item for a template which has yet to be added, its name is not yet
|
|
* given.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.MWTransclusionOutlinePartWidget
|
|
*
|
|
* @constructor
|
|
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder
|
|
*/
|
|
ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlinePlaceholderWidget( placeholder ) {
|
|
var label = placeholder.getTransclusion().isSingleTemplate() ?
|
|
ve.msg( 'visualeditor-dialog-transclusion-template-search' ) :
|
|
ve.msg( 'visualeditor-dialog-transclusion-add-template' );
|
|
|
|
// Parent constructor
|
|
ve.ui.MWTransclusionOutlinePlaceholderWidget.super.call( this, placeholder, {
|
|
icon: 'puzzle',
|
|
label: label
|
|
} );
|
|
|
|
this.$element.addClass( 've-ui-mwTransclusionOutlinePlaceholderWidget' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );
|