mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
c4c9923c91
This fix adds a directionality property to the frame objects so directions can be inherited and manipulated inside the frame <body> tags. There are also several corrections to flipping positioning of panels in the GridLayout and of the icons in fieldsets and labeled elements so they appear properly (right instead of left). I've added a 've-rtl' / 've-ltr' class to frame content divs to serve as selectors for rtl fixes and general language fixes. Most CSS corrections would likely be fixed when CSSJanus works in iframes, but the selectors would still be useful. This sets the stage for directionality inheritance inside iframes, and fixes most of the problem with the Page Settings window in RTL wikis. It also fixes all the labels with icons across VE interface. Bug: 49613 Change-Id: I418e669b0999552167683352acb365a4249ab9cc
38 lines
805 B
JavaScript
38 lines
805 B
JavaScript
/*!
|
|
* VisualEditor UserInterface PanelLayout class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Panel layout.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.Layout
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Config options
|
|
* @cfg {boolean} [scroll] Allow vertical scrolling
|
|
*/
|
|
ve.ui.PanelLayout = function VeUiPanelLayout( config ) {
|
|
// Config initialization
|
|
config = config || {};
|
|
|
|
// Parent constructor
|
|
ve.ui.Layout.call( this, config );
|
|
|
|
// Initialization
|
|
this.$.addClass( 've-ui-panelLayout' );
|
|
if ( config.scroll ) {
|
|
this.$.css( 'overflow-y', 'auto' );
|
|
}
|
|
|
|
// Add directionality class:
|
|
this.$.addClass( 've-' + this.$$.frame.dir );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.PanelLayout, ve.ui.Layout );
|