mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-02 01:46:47 +00:00
6a068e7d83
Changed: VisualEditor.i18n.php * Updated Link inspector i18n messages ve.ui.MetaDialog.js -> ve.ui.PagedDialog * Moved paging functionality into Paged dialog ve.ui.EditorPanelLayout -> ve.ui.PagePanelLayout.js * Renamed from EditorPanelLayout to work nicely with the concept of stacks and pages ve.ui.GroupElement.js * Added addItem method and change addItems to use it ve.ui.Dialog.css * Updated classname as per refactor of meta dialog ve.ui.StackPanelLayout.js * Set currentItem property on showItem * In addItems method, show currentItem with class method ** rather display block on element ve.ui.Layout.css * Make editorPanel layout 100% in width. ve.ui.Widget.css * Added CategoryWidget and CategoryPopup styles * Other adjustments ve.ui.PopupWidget.js * Added auto-close on loss of focus * Made friendly with being initialized inside a frame ve.ui.MWLinkTargetInputWidget.js * Mixin ve.ui.PendingInputWidget and remove pending methods * Prevent querying on spaces * Reintroduce i18n messages for menu sections ve.ui.MenuWidget.js * Update cases of $input config property to input New: ve.ui.PagedDialog.js * Refactored base-class for mwMeta dialog (and probably other dialogs too) * Abstracts adding and accessing pages ve.ui.PendingInputWidget.js * Moved pushPending and popPending methods into pending class Change-Id: I29bcd92b7b5641941a4e98e65b2a56424a5263ff
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface PagePanelLayout class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Page panel layout.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.PanelLayout
|
|
* @mixins ve.ui.LabeledElement
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Config options
|
|
* @cfg {string} [icon=''] Symbolic icon name
|
|
*/
|
|
ve.ui.PagePanelLayout = function VeUiPagePanelLayout( config ) {
|
|
// Config initialization
|
|
config = ve.extendObject( config, { 'scroll': true } );
|
|
|
|
// Parent constructor
|
|
ve.ui.PanelLayout.call( this, config );
|
|
|
|
// Mixin constructors
|
|
ve.ui.LabeledElement.call( this, this.$$( '<div>' ), config );
|
|
|
|
// Properties
|
|
this.icon = config.icon;
|
|
|
|
// Initialization
|
|
this.$label.addClass( 've-ui-icon-' + config.icon + '-big' );
|
|
this.$.append( this.$label ).addClass( 've-ui-editorPanelLayout' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.PagePanelLayout, ve.ui.PanelLayout );
|
|
|
|
ve.mixinClass( ve.ui.PagePanelLayout, ve.ui.LabeledElement );
|
|
|
|
/* Methods */
|
|
|
|
ve.ui.PagePanelLayout.prototype.getIcon = function () {
|
|
return this.icon;
|
|
};
|