mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-22 02:53:04 +00:00
1904698105
I moved some code around and found that quite a lot of code wants to know: * Is the length of this transclusion exactly 1? * I need that 1st part. There is more that can potentially moved from the dialog to the model. But I don't want to make this patch to big. Bug: T292371 Change-Id: Ia94ed0450d04dd97c4c41f5bf7c266f9a534e821
23 lines
715 B
JavaScript
23 lines
715 B
JavaScript
/**
|
|
* @class
|
|
* @extends ve.ui.MWTransclusionOutlinePartWidget
|
|
*
|
|
* @constructor
|
|
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder
|
|
*/
|
|
ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlinePlaceholderWidget( placeholder ) {
|
|
var label = placeholder.getTransclusion().isSinglePart() ?
|
|
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
|
|
} );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );
|