Merge "Add API module to receive CSP reports."
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-widgets.js
index 31c0a45..c4486d3 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * 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 ) {
 
@@ -374,18 +374,22 @@ OO.ui.mixin.DraggableGroupElement.prototype.reorder = function ( item, newIndex
  * @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' );
+       }
 };
 
 /**
@@ -539,6 +543,7 @@ OO.ui.mixin.RequestManager.prototype.getRequestCacheDataFromResponse = null;
  *
  * @class
  * @abstract
+ * @mixins OO.ui.mixin.RequestManager
  *
  * @constructor
  * @param {Object} [config] Configuration options
@@ -1769,11 +1774,13 @@ OO.ui.BookletLayout.prototype.onStackLayoutVisibleItemChange = function ( page )
 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();
+                               }
                        }
-               } );
+               } );
        }
 };
 
@@ -2277,11 +2284,13 @@ OO.ui.IndexLayout.prototype.onStackLayoutFocus = function ( e ) {
 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();
+                               }
                        }
-               } );
+               } );
        }
 };