mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-17 19:31:51 +00:00
988cda65dd
Introduces new widgets forming the backbone of the experimental template dialog sidebar. FIXME: `text-overflow: ellipsis` is not working yet, the container styles need adjustment. Bug: T274543 Change-Id: Ie81b84be288553343017c4aaf8691c4e266995f5
33 lines
814 B
JavaScript
33 lines
814 B
JavaScript
/*!
|
|
* VisualEditor user interface MWTransclusionOutlineContainerWidget class.
|
|
*
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Container for transclusion, may contain a single or multiple templates.
|
|
*
|
|
* @class
|
|
* @extends OO.ui.Widget
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
* // TODO: document `items`
|
|
*/
|
|
ve.ui.MWTransclusionOutlineContainerWidget = function VeUiMWTransclusionOutlineContainerWidget( config ) {
|
|
// Parent constructor
|
|
ve.ui.MWTransclusionOutlineContainerWidget.super.call( this, config );
|
|
|
|
config = config || {};
|
|
|
|
// Initialization
|
|
var layout = new OO.ui.Layout( {
|
|
content: [ config.items ]
|
|
} );
|
|
this.$element.append( layout.$element );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlineContainerWidget, OO.ui.Widget );
|