2013-03-26 20:37:55 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface EditorPanelLayout class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Editor panel layout.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.PanelLayout
|
2013-03-28 01:37:34 +00:00
|
|
|
* @mixins ve.ui.LabeledElement
|
2013-03-26 20:37:55 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Config options
|
|
|
|
* @cfg {string} [icon=''] Symbolic icon name
|
|
|
|
*/
|
|
|
|
ve.ui.EditorPanelLayout = function VeUiEditorPanelLayout( config ) {
|
|
|
|
// Config initialization
|
|
|
|
config = ve.extendObject( config, { 'scroll': true } );
|
|
|
|
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.PanelLayout.call( this, config );
|
|
|
|
|
|
|
|
// Mixin constructors
|
2013-03-28 01:37:34 +00:00
|
|
|
ve.ui.LabeledElement.call( this, this.$$( '<div>' ), config );
|
2013-03-26 20:37:55 +00:00
|
|
|
|
|
|
|
// Initialization
|
2013-03-28 01:37:34 +00:00
|
|
|
this.$label.addClass( 've-ui-icon-' + config.icon + '-big' );
|
|
|
|
this.$.append( this.$label ).addClass( 've-ui-editorPanelLayout' );
|
2013-03-26 20:37:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.inheritClass( ve.ui.EditorPanelLayout, ve.ui.PanelLayout );
|
|
|
|
|
2013-03-28 01:37:34 +00:00
|
|
|
ve.mixinClass( ve.ui.EditorPanelLayout, ve.ui.LabeledElement );
|