mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-03 02:16:51 +00:00
d3a2fab2c4
Objectives: * Rename just about every use of "template" to "transclusion" * Make a proper data structure for transclusions * Abstract away template data * Use more template data in the user interface * Allow adding parameters * Allow removing templates, parameters and content Changes: ve.ui.Dialog.css * Add rule to place add param controls on a single line ve.ui.MWTemplateDialogs.js * Move template spec loading into transclusion class * Add remove button for parts and parameters * Add parameter adding form * Use template data for labels and descriptions ve.dm.* * Add new transclusion data structures *.php * Add links to new files *.* * Rename all things "template" to "transclusion" Bug: 39598 Bug: 49403 Change-Id: I3bcf924a3e179cb65f19e833277a39dfd3dad8bd
39 lines
1 KiB
JavaScript
39 lines
1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWTransclusionButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Transclusion button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogButtonTool
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.MWTransclusionButtonTool = function VeUiMwTransclusionButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.DialogButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.MWTransclusionButtonTool, ve.ui.DialogButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWTransclusionButtonTool.static.name = 'mwTransclusion';
|
|
|
|
ve.ui.MWTransclusionButtonTool.static.icon = 'template';
|
|
|
|
ve.ui.MWTransclusionButtonTool.static.titleMessage = 'visualeditor-dialogbutton-template-tooltip';
|
|
|
|
ve.ui.MWTransclusionButtonTool.static.dialog = 'mwTransclusion';
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'mwTransclusion', ve.ui.MWTransclusionButtonTool );
|