2016-03-08 21:14:12 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor user interface MWGalleryGroupWidget class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2016-03-08 21:14:12 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draggable group widget for reordering images in the MWGalleryDialog.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends OO.ui.Widget
|
2024-04-29 17:51:41 +00:00
|
|
|
* @mixes OO.ui.mixin.DraggableGroupElement
|
2016-03-08 21:14:12 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
2024-05-27 04:59:02 +00:00
|
|
|
* @param {string} [config.orientation='vertical']
|
2016-03-08 21:14:12 +00:00
|
|
|
*/
|
|
|
|
ve.ui.MWGalleryGroupWidget = function VeUiMWGalleryGroupWidget( config ) {
|
|
|
|
// Configuration initialization
|
|
|
|
config = config || {};
|
|
|
|
|
|
|
|
// Parent constructor
|
|
|
|
ve.ui.MWGalleryGroupWidget.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// Mixin constructors
|
2021-11-15 17:25:51 +00:00
|
|
|
OO.ui.mixin.DraggableGroupElement.call( this, ve.extendObject( {}, config, { $group: this.$element } ) );
|
2016-03-08 21:14:12 +00:00
|
|
|
|
|
|
|
// Events
|
|
|
|
this.aggregate( {
|
|
|
|
edit: 'editItem'
|
|
|
|
} );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWGalleryGroupWidget, OO.ui.Widget );
|
|
|
|
|
|
|
|
OO.mixinClass( ve.ui.MWGalleryGroupWidget, OO.ui.mixin.DraggableGroupElement );
|
|
|
|
|
|
|
|
/* Events */
|
|
|
|
|
|
|
|
/**
|
2024-04-29 11:52:40 +00:00
|
|
|
* @event ve.ui.MWGalleryGroupWidget#editItem
|
2016-03-08 21:14:12 +00:00
|
|
|
*/
|