2014-10-15 23:56:44 +00:00
|
|
|
/*!
|
2015-07-18 21:42:09 +00:00
|
|
|
* VisualEditor UserInterface MWTargetWidget class.
|
2014-10-15 23:56:44 +00:00
|
|
|
*
|
2016-01-03 22:56:59 +00:00
|
|
|
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
|
2014-10-15 23:56:44 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-07-18 21:42:09 +00:00
|
|
|
* Creates an ve.ui.MWTargetWidget object.
|
2014-10-15 23:56:44 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
2015-07-18 21:42:09 +00:00
|
|
|
* @extends ve.ui.TargetWidget
|
2014-10-15 23:56:44 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.Document} doc Document model
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
2015-07-18 21:42:09 +00:00
|
|
|
ve.ui.MWTargetWidget = function VeUiMWTargetWidget( doc, config ) {
|
2014-10-15 23:56:44 +00:00
|
|
|
// Parent constructor
|
2015-07-18 21:42:09 +00:00
|
|
|
ve.ui.MWTargetWidget.super.call( this, doc, config );
|
2014-10-15 23:56:44 +00:00
|
|
|
|
|
|
|
// Initialization
|
2015-07-18 21:42:09 +00:00
|
|
|
this.$element.addClass( 've-ui-mwTargetWidget' );
|
2014-10-15 23:56:44 +00:00
|
|
|
this.surface.getView().$element.addClass( 'mw-body-content' );
|
2015-06-30 08:46:55 +00:00
|
|
|
this.surface.$placeholder.addClass( 'mw-body-content' );
|
2014-10-15 23:56:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2015-07-18 21:42:09 +00:00
|
|
|
OO.inheritClass( ve.ui.MWTargetWidget, ve.ui.TargetWidget );
|