mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
8409d16f0f
Objective: * Add default sort key field to meta dialog * Replace PagePanelLayout with a generic panel containing one or more FieldsetLayout elements Changes: *.php * Added/removed file links ve.dm.MWDefaultSortMetaItem.js * Added getContent method ve.dm.MetaItem.js * Added replaceWith method ve.dm.MetaList.js * Allow insertion at the end by omitting offset and index ve.dm.MWMetaDialog.js * Added default sort key field * Put category and default sort fields inside fieldsets * Added loading/saving default sort key ve.ui.PagedLayout.js * Changed class used for pages to generic panel layout ve.ui.PagePanelLayout * Moved title/icon stuff to field set ve.ui.FieldsetLayout.js * New class, adds fieldset with legend ve.ui.StackPanelLayout.js * Moved up to the layouts directory ve.ui.Dialog.css * Moved style for paged panel from layout stylesheet ve.ui.Layout.css * Added styles for fieldsets ve.ui.Widget.css * Adjusted margins of input label widgets ve.ui.MWCategoryWidget.js, ve.ui.MWCategoryPopupWidget.js * Added setDefaultSortKey method Change-Id: I979f5e3f08a688790c9f54086206ed1999af13ea
43 lines
1 KiB
JavaScript
43 lines
1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface FieldsetLayout class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Fieldset layout.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.Layout
|
|
* @mixins ve.ui.LabeledElement
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Config options
|
|
* @cfg {string} [icon=''] Symbolic icon name
|
|
*/
|
|
ve.ui.FieldsetLayout = function VeUiFieldsetLayout( config ) {
|
|
// Config initialization
|
|
config = ve.extendObject( { 'icon': 'window' }, config );
|
|
|
|
// Parent constructor
|
|
ve.ui.Layout.call( this, config );
|
|
|
|
// Mixin constructors
|
|
ve.ui.LabeledElement.call( this, this.$$( '<legend>' ), config );
|
|
|
|
// Initialization
|
|
this.$label.addClass( 've-ui-icon-' + config.icon );
|
|
this.$.append( this.$label ).addClass( 've-ui-fieldsetLayout' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.FieldsetLayout, ve.ui.Layout );
|
|
|
|
ve.mixinClass( ve.ui.FieldsetLayout, ve.ui.LabeledElement );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.FieldsetLayout.static.tagName = 'fieldset';
|