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
|
|
|
|
* @mixins OO.ui.mixin.DraggableGroupElement
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
2021-09-11 08:05:31 +00:00
|
|
|
* @cfg {string} [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 */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @event editItem
|
|
|
|
*/
|