X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Flib%2Foojs-ui%2Foojs-ui-widgets.js;h=4bf461f996b457a615e6220341093b1cc6e65865;hb=4fa09f5bc81f19f0b32ce61c37219c39cc6eae02;hp=6962c9290942df666b094d6e3a77211a8b167d41;hpb=dcdb8e463e3b2be121c61c91df13ea36d270a602;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/lib/oojs-ui/oojs-ui-widgets.js b/resources/lib/oojs-ui/oojs-ui-widgets.js index 6962c92909..4bf461f996 100644 --- a/resources/lib/oojs-ui/oojs-ui-widgets.js +++ b/resources/lib/oojs-ui/oojs-ui-widgets.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.18.0 + * OOjs UI v0.18.4-fix (d4045dee45) * https://www.mediawiki.org/wiki/OOjs_UI * - * Copyright 2011â2016 OOjs UI Team and other contributors. + * Copyright 2011â2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2016-11-09T00:52:37Z + * Date: 2017-01-19T20:22:26Z */ ( function ( OO ) { @@ -1642,7 +1642,7 @@ OO.ui.MenuLayout.prototype.getMenuPosition = function () { * @constructor * @param {Object} [config] Configuration options * @cfg {boolean} [continuous=false] Show all pages, one after another - * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new page is displayed. + * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new page is displayed. Disabled on mobile. * @cfg {boolean} [outlined=false] Show the outline. The outline is used to navigate through the pages of the booklet. * @cfg {boolean} [editable=false] Show controls for adding, removing and reordering pages */ @@ -1781,7 +1781,7 @@ OO.ui.BookletLayout.prototype.onStackLayoutSet = function ( page ) { if ( !this.scrolling && page ) { page.scrollElementIntoView( { complete: function () { - if ( layout.autoFocus ) { + if ( layout.autoFocus && !OO.ui.isMobile() ) { layout.focus(); } } @@ -2112,6 +2112,7 @@ OO.ui.BookletLayout.prototype.setPage = function ( name ) { // meaningless because the next page is not visible yet and thus can't hold focus. if ( this.autoFocus && + !OO.ui.isMobile() && this.stackLayout.continuous && OO.ui.findFocusable( page.$element ).length !== 0 ) { @@ -2188,7 +2189,7 @@ OO.ui.BookletLayout.prototype.selectFirstSelectablePage = function () { * @param {Object} [config] Configuration options * @cfg {boolean} [continuous=false] Show all cards, one after another * @cfg {boolean} [expanded=true] Expand the content panel to fill the entire parent element. - * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new card is displayed. + * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new card is displayed. Disabled on mobile. */ OO.ui.IndexLayout = function OoUiIndexLayout( config ) { // Configuration initialization @@ -2291,7 +2292,7 @@ OO.ui.IndexLayout.prototype.onStackLayoutSet = function ( card ) { if ( card ) { card.scrollElementIntoView( { complete: function () { - if ( layout.autoFocus ) { + if ( layout.autoFocus && !OO.ui.isMobile() ) { layout.focus(); } } @@ -2556,6 +2557,7 @@ OO.ui.IndexLayout.prototype.setCard = function ( name ) { // meaningless because the next card is not visible yet and thus can't hold focus. if ( this.autoFocus && + !OO.ui.isMobile() && this.stackLayout.continuous && OO.ui.findFocusable( card.$element ).length !== 0 ) { @@ -3573,6 +3575,7 @@ OO.ui.CapsuleItemWidget.prototype.focus = function () { * @param {Object} [config] Configuration options * @cfg {string} [placeholder] Placeholder text * @cfg {boolean} [allowArbitrary=false] Allow data items to be added even if not present in the menu. + * @cfg {boolean} [allowDuplicates=false] Allow duplicate items to be added. * @cfg {Object} [menu] (required) Configuration options to pass to the * {@link OO.ui.MenuSelectWidget menu select widget}. * @cfg {Object} [popup] Configuration options to pass to the {@link OO.ui.PopupWidget popup widget}. @@ -3594,6 +3597,7 @@ OO.ui.CapsuleMultiselectWidget = function OoUiCapsuleMultiselectWidget( config ) // Configuration initialization config = $.extend( { allowArbitrary: false, + allowDuplicates: false, $overlay: this.$element }, config ); @@ -3625,6 +3629,7 @@ OO.ui.CapsuleMultiselectWidget = function OoUiCapsuleMultiselectWidget( config ) // Properties this.$content = $( '