/*!
- * OOjs UI v0.17.3
+ * OOjs UI v0.17.5
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-05-24T22:46:32Z
+ * Date: 2016-06-29T13:27:08Z
*/
( function ( OO ) {
* @param {OO.ui.mixin.DraggableElement} item Dragged item
*/
OO.ui.mixin.DraggableGroupElement.prototype.setDragItem = function ( item ) {
- this.dragItem = item;
- this.$element.on( 'dragover', this.onDragOver.bind( this ) );
- this.$element.addClass( 'oo-ui-draggableGroupElement-dragging' );
+ if ( this.dragItem !== item ) {
+ this.dragItem = item;
+ this.$element.on( 'dragover', this.onDragOver.bind( this ) );
+ this.$element.addClass( 'oo-ui-draggableGroupElement-dragging' );
+ }
};
/**
* Unset the current dragged item
*/
OO.ui.mixin.DraggableGroupElement.prototype.unsetDragItem = function () {
- this.dragItem = null;
- this.$element.off( 'dragover' );
- this.$element.removeClass( 'oo-ui-draggableGroupElement-dragging' );
+ if ( this.dragItem ) {
+ this.dragItem = null;
+ this.$element.off( 'dragover' );
+ this.$element.removeClass( 'oo-ui-draggableGroupElement-dragging' );
+ }
};
/**
*
* @class
* @abstract
+ * @mixins OO.ui.mixin.RequestManager
*
* @constructor
* @param {Object} [config] Configuration options
OO.ui.BookletLayout.prototype.onStackLayoutSet = function ( page ) {
var layout = this;
if ( !this.scrolling && page ) {
- page.scrollElementIntoView( { complete: function () {
- if ( layout.autoFocus ) {
- layout.focus();
+ page.scrollElementIntoView( {
+ complete: function () {
+ if ( layout.autoFocus ) {
+ layout.focus();
+ }
}
- } } );
+ } );
}
};
OO.ui.IndexLayout.prototype.onStackLayoutSet = function ( card ) {
var layout = this;
if ( card ) {
- card.scrollElementIntoView( { complete: function () {
- if ( layout.autoFocus ) {
- layout.focus();
+ card.scrollElementIntoView( {
+ complete: function () {
+ if ( layout.autoFocus ) {
+ layout.focus();
+ }
}
- } } );
+ } );
}
};