mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
a8b4fc4966
New changes: ff237d4 Fix z-indexes in core e88d43e Localisation updates from https://translatewiki.net. cf61803 Consistently use ve.ui.WindowManager everywhere f9dfdb8 Update OOjs UI to v0.1.0-pre (23565e7519) f79f7e3 Update OOjs UI to v0.1.0-pre (8f8896196f) c8201dd Update OOjs UI to v0.1.0-pre (9ed4cf2557) Local changes for the breaking change to OptionWidget and sub-classes. Change-Id: Ife6abd312d4dc97be67cb84eea4cb9c6a0a31b1d
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWReferenceResultWidget class.
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Creates an ve.ui.MWReferenceResultWidget object.
|
|
*
|
|
* @class
|
|
* @extends OO.ui.OptionWidget
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
* @cfg {boolean} [divider] Section divider item, not highlightable or selectable
|
|
*/
|
|
ve.ui.MWReferenceResultWidget = function VeUiMWReferenceResultWidget( config ) {
|
|
// Configuration initialization
|
|
config = config || {};
|
|
|
|
// Parent constructor
|
|
OO.ui.OptionWidget.call( this, config );
|
|
|
|
// Properties
|
|
this.$shield = this.$( '<div>' );
|
|
|
|
// Initialization
|
|
this.$shield.addClass( 've-ui-mwReferenceResultWidget-shield' );
|
|
this.$element
|
|
.addClass( 've-ui-mwReferenceResultWidget' )
|
|
.append( this.$shield );
|
|
if ( config.divider ) {
|
|
this.$element.addClass( 've-ui-mwReferenceResultWidget-divider' );
|
|
this.setDisabled( true );
|
|
}
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWReferenceResultWidget, OO.ui.OptionWidget );
|