mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWGalleryGroupWidget.js
Thalia 6fdbe9fd7e Make dialog for editing galleries
Make new graphical interface for editing existing
galleries and adding new galleries.

NB The dialog does not yet support rich text in the
image captions, nor does it provide separate fields for
e.g. link, alt text, etc. These are dependent on parsing
the text within the tag, which is yet to be implemented
by Parsoid. For now, these attributes should be
specified in wikitext in the image-specific caption
field.

Bug: T45037
Change-Id: I2b4082e991268241a15b9bbd6d85c94cdc2185f2
2016-06-07 13:53:02 +01:00

45 lines
1,022 B
JavaScript

/*!
* VisualEditor user interface MWGalleryGroupWidget class.
*
* @copyright 2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Draggable group widget for reordering images in the MWGalleryDialog.
*
* @class
* @extends OO.ui.Widget
* @mixins OO.ui.mixin.DraggableGroupElement
*
* @constructor
* @param {Object} [config] Configuration options
*/
ve.ui.MWGalleryGroupWidget = function VeUiMWGalleryGroupWidget( config ) {
// Configuration initialization
config = config || {};
// Parent constructor
ve.ui.MWGalleryGroupWidget.super.apply( this, arguments );
// Mixin constructors
OO.ui.mixin.DraggableGroupElement.call( this, $.extend( {}, config, { $group: this.$element } ) );
// Events
this.aggregate( {
edit: 'editItem'
} );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWGalleryGroupWidget, OO.ui.Widget );
OO.mixinClass( ve.ui.MWGalleryGroupWidget, OO.ui.mixin.DraggableGroupElement );
/* Events */
/**
* @event editItem
*/