/*!
- * OOjs UI v0.22.3
+ * OOjs UI v0.22.5
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-07-11T22:12:33Z
+ * Date: 2017-08-22T21:37:37Z
*/
( function ( OO ) {
this.index = null;
this.$handle = config.$handle || this.$element;
this.wasHandleUsed = null;
- this.draggable = config.draggable === undefined ? true : !!config.draggable;
// Initialize and events
- this.$element.addClass( 'oo-ui-draggableElement' )
- // We make the entire element draggable, not just the handle, so that
- // the whole element appears to move. wasHandleUsed prevents drags from
- // starting outside the handle
- .attr( 'draggable', true )
+ this.$element
+ .addClass( 'oo-ui-draggableElement' )
.on( {
mousedown: this.onDragMouseDown.bind( this ),
dragstart: this.onDragStart.bind( this ),
drop: this.onDrop.bind( this )
} );
this.$handle.addClass( 'oo-ui-draggableElement-handle' );
+ this.toggleDraggable( config.draggable === undefined ? true : !!config.draggable );
};
OO.initClass( OO.ui.mixin.DraggableElement );
this.draggable = isDraggable;
this.$handle.toggleClass( 'oo-ui-draggableElement-undraggable', !this.draggable );
+
+ // We make the entire element draggable, not just the handle, so that
+ // the whole element appears to move. wasHandleUsed prevents drags from
+ // starting outside the handle
+ this.$element.prop( 'draggable', this.draggable );
}
};
}
this.$element
.addClass( 'oo-ui-draggableGroupElement' )
- .attr( 'role', 'listbox' )
.append( this.$status )
.toggleClass( 'oo-ui-draggableGroupElement-horizontal', this.orientation === 'horizontal' );
};
* @deprecated since v0.21.3
*/
OO.ui.CardLayout = function OoUiCardLayout() {
- OO.ui.warnDeprecation( 'CardLayout has been renamed to TabPanel layout. Use that instead. See T155152' );
+ OO.ui.warnDeprecation( 'CardLayout has been renamed to TabPanel layout. Use that instead. See T155152.' );
// Parent constructor
OO.ui.CardLayout.parent.apply( this, arguments );
};
this.outlineVisible = show;
this.toggleMenu( show );
if ( show && this.editable ) {
- // HACK: When the sidebar stops animating, kill dumb scrollbars (T161798). Only necessary when
- // outline controls are present, The delay matches transition on `.oo-ui-menuLayout-menu`.
+ // HACK: Kill dumb scrollbars when the sidebar stops animating, see T161798. Only necessary when
+ // outline controls are present, delay matches transition on `.oo-ui-menuLayout-menu`.
setTimeout( function () {
OO.ui.Element.static.reconsiderScrollbars( booklet.outlinePanel.$element[ 0 ] );
}, 200 );
configurable: true,
enumerable: true,
get: function () {
- OO.ui.warnDeprecation( 'IndexLayout\'s currentCardName property is deprecated. Use currentTabPanelName instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s currentCardName property is deprecated. Use currentTabPanelName instead. See T155152.' );
return this.currentTabPanelName;
},
set: function ( value ) {
- OO.ui.warnDeprecation( 'IndexLayout\'s currentCardName property is deprecated. Use currentTabPanelName instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s currentCardName property is deprecated. Use currentTabPanelName instead. See T155152.' );
this.currentTabPanelName = value;
}
} );
configurable: true,
enumerable: true,
get: function () {
- OO.ui.warnDeprecation( 'IndexLayout\'s cards property is deprecated. Use tabPanels instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s cards property is deprecated. Use tabPanels instead. See T155152.' );
return this.tabPanels;
},
set: function ( value ) {
- OO.ui.warnDeprecation( 'IndexLayout\'s cards property is deprecated. Use tabPanels instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s cards property is deprecated. Use tabPanels instead. See T155152.' );
this.tabPanels = value;
}
} );
* @deprecated since v0.21.3, use `getClosestTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getClosestCard = function ( tabPanel ) {
- OO.ui.warnDeprecation( 'IndexLayout\'s getClosestCard method is deprecated. Use getClosestTabPanel instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s getClosestCard method is deprecated. Use getClosestTabPanel instead. See T155152.' );
return this.getClosestTabPanel( tabPanel );
};
* @deprecated since v0.21.3, use `getTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getCard = function ( name ) {
- OO.ui.warnDeprecation( 'IndexLayout\'s getCard method is deprecated. Use getTabPanel instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s getCard method is deprecated. Use getTabPanel instead. See T155152.' );
return this.getTabPanel( name );
};
* @deprecated since v0.21.3, use `getCurrentTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getCurrentCard = function () {
- OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCard method is deprecated. Use getCurrentTabPanel instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCard method is deprecated. Use getCurrentTabPanel instead. See T155152.' );
return this.getCurrentTabPanel();
};
* @deprecated since v0.21.3, use `getCurrentTabPanelName` instead
*/
OO.ui.IndexLayout.prototype.getCurrentCardName = function () {
- OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCardName method is deprecated. Use getCurrentTabPanelName instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCardName method is deprecated. Use getCurrentTabPanelName instead. See T155152.' );
return this.getCurrentTabPanelName();
};
* @deprecated since v0.21.3, use `addTabPanels` instead
*/
OO.ui.IndexLayout.prototype.addCards = function ( tabPanels, index ) {
- OO.ui.warnDeprecation( 'IndexLayout\'s addCards method is deprecated. Use addTabPanels instead. See T155152' );
+ OO.ui.warnDeprecation( 'IndexLayout\'s addCards method is deprecated. Use addTabPanels instead. See T155152.' );
return this.addTabPanels( tabPanels, index );
};
this.closeButton = new OO.ui.ButtonWidget( {
framed: false,
icon: 'close',
- tabIndex: -1
+ tabIndex: -1,
+ title: OO.ui.msg( 'ooui-item-remove' )
} ).on( 'click', this.onCloseClick.bind( this ) );
this.on( 'disable', function ( disabled ) {
this.closeButton = new OO.ui.ButtonWidget( {
framed: false,
icon: 'close',
- tabIndex: -1
+ tabIndex: -1,
+ title: OO.ui.msg( 'ooui-item-remove' )
} );
this.closeButton.setDisabled( this.isDisabled() );
true : !!config.allowReordering
);
- this.inputPosition = this.constructor.static.allowedInputPositions.indexOf( config.inputPosition ) > -1 ?
+ this.inputPosition =
+ this.constructor.static.allowedInputPositions.indexOf( config.inputPosition ) > -1 ?
config.inputPosition : 'inline';
this.allowEditTags = config.allowEditTags === undefined ? true : !!config.allowEditTags;
this.allowArbitrary = !!config.allowArbitrary;