X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Flib%2Fooui%2Foojs-ui-windows.js;h=76931355c3ab61dc4ae2a9645ff3801f259e5356;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hp=37f266455f4209b07b15d0335b68682db8794d40;hpb=d5dd4fd00c6316e8652945dc7fc543f1c469afbc;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/lib/ooui/oojs-ui-windows.js b/resources/lib/ooui/oojs-ui-windows.js index 37f266455f..bdc7535af1 100644 --- a/resources/lib/ooui/oojs-ui-windows.js +++ b/resources/lib/ooui/oojs-ui-windows.js @@ -1,12 +1,12 @@ /*! - * OOUI v0.31.1 + * OOUI v0.33.1 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2019 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2019-03-21T15:54:37Z + * Date: 2019-07-03T21:05:08Z */ ( function ( OO ) { @@ -3234,6 +3234,9 @@ OO.ui.ProcessDialog = function OoUiProcessDialog( config ) { // Initialization this.$element.addClass( 'oo-ui-processDialog' ); + if ( OO.ui.isMobile() ) { + this.$element.addClass( 'oo-ui-isMobile' ); + } }; /* Setup */ @@ -3328,21 +3331,24 @@ OO.ui.ProcessDialog.prototype.initialize = function () { * @inheritdoc */ OO.ui.ProcessDialog.prototype.getActionWidgetConfig = function ( config ) { - var isMobile = OO.ui.isMobile(); - - // Default to unframed on mobile - config = $.extend( { framed: !isMobile }, config ); - // Change back buttons to icon only on mobile - if ( - isMobile && - ( - config.flags === 'back' || - ( Array.isArray( config.flags ) && config.flags.indexOf( 'back' ) !== -1 ) - ) - ) { + function checkFlag( flag ) { + return config.flags === flag || + ( Array.isArray( config.flags ) && config.flags.indexOf( flag ) !== -1 ); + } + + // Default to unframed. + config = $.extend( { framed: true }, config ); + if ( checkFlag( 'close' ) ) { + // Change close buttons to icon only. + $.extend( config, { + icon: 'close', + invisibleLabel: true + } ); + } else if ( OO.ui.isMobile() && checkFlag( 'back' ) ) { + // Change back buttons to icon only. $.extend( config, { icon: 'previous', - label: '' + invisibleLabel: true } ); }