mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +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
34 lines
999 B
JavaScript
34 lines
999 B
JavaScript
/*!
|
|
* VisualEditor UserInterface MWInternalLinkMenuOptionWidget class
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see http://ve.mit-license.org
|
|
*/
|
|
|
|
/**
|
|
* Creates a ve.ui.MWInternalLinkMenuOptionWidget object.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.MWLinkMenuOptionWidget
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
* @cfg {string} [pagename] Pagename to return the names of internal pages
|
|
*/
|
|
ve.ui.MWInternalLinkMenuOptionWidget = function VeUiMWInternalLinkMenuOptionWidget( config ) {
|
|
// Config initialization
|
|
config = config || {};
|
|
|
|
// Properties
|
|
this.pagename = config.pagename;
|
|
|
|
// Parent constructor
|
|
ve.ui.MWLinkMenuOptionWidget.call( this, $.extend( { label: this.pagename, href: mw.util.getUrl( this.pagename ) }, config ) );
|
|
|
|
// Style based on link cache information
|
|
ve.init.platform.linkCache.styleElement( this.pagename, this.$link );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWInternalLinkMenuOptionWidget, ve.ui.MWLinkMenuOptionWidget );
|