2021-07-13 09:00:57 +00:00
|
|
|
/**
|
2021-07-13 19:01:30 +00:00
|
|
|
* Generic button-like widget for items in the template dialog sidebar. See
|
|
|
|
* {@see OO.ui.ButtonWidget} for inspiration.
|
2021-07-13 10:15:47 +00:00
|
|
|
*
|
2021-07-13 09:00:57 +00:00
|
|
|
* @class
|
|
|
|
* @extends OO.ui.Widget
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} config
|
|
|
|
* @cfg {string} [icon='']
|
|
|
|
* @cfg {string} label
|
|
|
|
*/
|
|
|
|
ve.ui.MWTransclusionOutlineButtonWidget = function VeUiMWTransclusionOutlineButtonWidget( config ) {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.MWTransclusionOutlineButtonWidget.super.call( this, config );
|
|
|
|
|
|
|
|
// Mixin constructors
|
2021-07-13 10:15:47 +00:00
|
|
|
OO.ui.mixin.ButtonElement.call( this, {
|
|
|
|
framed: false
|
|
|
|
} );
|
2021-07-13 09:00:57 +00:00
|
|
|
OO.ui.mixin.IconElement.call( this, config );
|
|
|
|
OO.ui.mixin.LabelElement.call( this, config );
|
2021-07-13 19:01:30 +00:00
|
|
|
OO.ui.mixin.TabIndexedElement.call( this, ve.extendObject( {
|
|
|
|
$tabIndexed: this.$button
|
|
|
|
}, config ) );
|
2021-07-13 09:00:57 +00:00
|
|
|
|
|
|
|
this.$element
|
|
|
|
.addClass( 've-ui-mwTransclusionOutlineButtonWidget' )
|
2021-07-13 10:15:47 +00:00
|
|
|
.append( this.$button.append( this.$icon, this.$label ) );
|
2021-07-13 09:00:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlineButtonWidget, OO.ui.Widget );
|
2021-07-13 10:15:47 +00:00
|
|
|
OO.mixinClass( ve.ui.MWTransclusionOutlineButtonWidget, OO.ui.mixin.ButtonElement );
|
2021-07-13 09:00:57 +00:00
|
|
|
OO.mixinClass( ve.ui.MWTransclusionOutlineButtonWidget, OO.ui.mixin.IconElement );
|
|
|
|
OO.mixinClass( ve.ui.MWTransclusionOutlineButtonWidget, OO.ui.mixin.LabelElement );
|
|
|
|
// TODO: Add OO.ui.mixin.TitledElement?
|
2021-07-13 19:01:30 +00:00
|
|
|
// TODO: Add OO.ui.mixin.FlaggedElement?
|
|
|
|
OO.mixinClass( ve.ui.MWTransclusionOutlineButtonWidget, OO.ui.mixin.TabIndexedElement );
|
2021-07-13 10:15:47 +00:00
|
|
|
// TODO: Add OO.ui.mixin.AccessKeyedElement?
|