X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Flib%2Fooui%2Foojs-ui-windows.js;h=bdc7535af11007af14685faef5d338e9a6dcbaab;hp=59b2c0ca6654d1c9694473a21c0f2ef89072fcc7;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hpb=f79c9e6ca3c02090d6d56eaecb2ab90d4198b2b9 diff --git a/resources/lib/ooui/oojs-ui-windows.js b/resources/lib/ooui/oojs-ui-windows.js index 59b2c0ca66..bdc7535af1 100644 --- a/resources/lib/ooui/oojs-ui-windows.js +++ b/resources/lib/ooui/oojs-ui-windows.js @@ -1,12 +1,12 @@ /*! - * OOUI v0.32.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-06-05T16:24:08Z + * 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 } ); }