mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +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
33 lines
831 B
JavaScript
33 lines
831 B
JavaScript
/*!
|
|
* VisualEditor UserInterface MWLinkMenuOptionWidget class
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see http://ve.mit-license.org
|
|
*/
|
|
|
|
/**
|
|
* Creates a ve.ui.MWLinkMenuOptionWidget object.
|
|
*
|
|
* @class
|
|
* @extends OO.ui.MenuOptionWidget
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
* @cfg {string} [href] href to point to pages from link suggestions
|
|
*/
|
|
ve.ui.MWLinkMenuOptionWidget = function VeUiMWLinkMenuOptionWidget( config ) {
|
|
// Config initialization
|
|
config = config || {};
|
|
|
|
// Parent constructor
|
|
ve.ui.MWLinkMenuOptionWidget.super.call( this, config );
|
|
|
|
// initialization
|
|
this.$label.wrap( '<a>' );
|
|
this.$link = this.$label.parent();
|
|
this.$link.attr( 'href', config.href );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWLinkMenuOptionWidget, OO.ui.MenuOptionWidget );
|