mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWReferenceResultWidget.js
James D. Forrester a8b4fc4966 Update VE core submodule to master (c8201dd)
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
2014-11-21 17:41:04 -08:00

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 );