X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Flib%2Foojs-ui%2Foojs-ui-mediawiki.js;h=30b9f93d04cd4513b807e6099d2a1cdcbf58946e;hb=a4943f548be4cfc8f286f00fc8064ff0e377f2ba;hp=32daabdb2baf8995583f84a70c16220ebe021fce;hpb=a081832b8af5b7a3c390b44eba2492c54464f6eb;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js b/resources/lib/oojs-ui/oojs-ui-mediawiki.js index 32daabdb2b..30b9f93d04 100644 --- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js +++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.18.4-fix (d4045dee45) + * OOjs UI v0.21.3 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2017-01-19T20:22:26Z + * Date: 2017-05-10T00:55:40Z */ ( function ( OO ) { @@ -48,14 +48,19 @@ OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) { if ( element.supports( [ 'hasFlag' ] ) ) { isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed(); isActive = element.supports( [ 'isActive' ] ) && element.isActive(); - if ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) { - // Button with a dark background, use white icon + if ( + // Button with a dark background + isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) || + // Toolbar with a dark background + OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup && ( isActive || element.hasFlag( 'primary' ) ) + ) { + // … use white icon / indicator, regardless of other flags variants.invert = true; } else if ( !isFramed && element.isDisabled() ) { - // Frameless disabled button, always use black icon regardless of flags + // Frameless disabled button, always use black icon / indicator regardless of other flags variants.invert = false; } else if ( !element.isDisabled() ) { - // Any other kind of button, use the right colored icon if available + // Any other kind of button, use the right colored icon / indicator if available variants.progressive = element.hasFlag( 'progressive' ); variants.constructive = element.hasFlag( 'constructive' ); variants.destructive = element.hasFlag( 'destructive' );