mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js
Trevor Parscal 77eae16b88 Apply mw-body-content styles to SurfaceWidget
Changes:
* Override ve.ui.SurfaceWidget for use in MW
* Add mw-body-content class to surface view container
* Assert 1em sizing for surface view container to prevent
  mw-body-content from applying its own sizing
* Add new scripts and styles to RL config

Bug: 71652
Change-Id: Iac86facdc0c7a0e48c0f3617e2f6c2e7f001525e
2014-10-15 23:58:46 +00:00

31 lines
782 B
JavaScript

/*!
* VisualEditor UserInterface MWSurfaceWidget class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Creates an ve.ui.MWSurfaceWidget object.
*
* @class
* @abstract
* @extends ve.ui.SurfaceWidget
*
* @constructor
* @param {ve.dm.Document} doc Document model
* @param {Object} [config] Configuration options
*/
ve.ui.MWSurfaceWidget = function VeUiMWSurfaceWidget( doc, config ) {
// Parent constructor
ve.ui.MWSurfaceWidget.super.call( this, doc, config );
// Initialization
this.$element.addClass( 've-ui-mwSurfaceWidget' );
this.surface.getView().$element.addClass( 'mw-body-content' );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWSurfaceWidget, ve.ui.SurfaceWidget );