mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
3963b1daf2
Fetches images from PageImages extension and descriptions from Wikibase. Bug: T93693 Bug: T93694 (partial) Change-Id: I1bea6b7b57ab951e79468cfa00e9eecddc113d18
34 lines
891 B
JavaScript
34 lines
891 B
JavaScript
/*!
|
|
* VisualEditor UserInterface MWLinkMenuOptionWidget class.
|
|
*
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* 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 = $.extend( { icon: null }, 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 );
|