Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePlaceholderWidget.js

raw symbols SCIP
1 /**
2 * Sidebar item for a template which has yet to be added, its name is not yet
3 * given.
4 *
5 * @class
6 * @extends ve.ui.MWTransclusionOutlinePartWidget
7 *
8 * @constructor
9 * @param {ve.dm.MWTemplatePlaceholderModel} placeholder
10 */
11 ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlinePlaceholderWidget( placeholder ) {
12 const label = placeholder.getTransclusion().isSingleTemplate() ?
13 ve.msg( 'visualeditor-dialog-transclusion-template-search' ) :
14 ve.msg( 'visualeditor-dialog-transclusion-add-template' );
15
16 // Parent constructor
17 ve.ui.MWTransclusionOutlinePlaceholderWidget.super.call( this, placeholder, {
18 icon: 'puzzle',
19 label: label
20 } );
21
22 this.$element.addClass( 've-ui-mwTransclusionOutlinePlaceholderWidget' );
23 };
24
25 /* Inheritance */
26
27 OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );