X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=resources%2Flib%2Foojs-ui%2Foojs-ui-mediawiki.js;h=0dac2aaf6cf99941a976fdb510cae871f6db080a;hb=da0b4741984825903748e99980d5b86478cd933d;hp=27a4657563f15810a04685a227e398f83a170226;hpb=ca8aa5a6a621852f0a8ba58df7f2d9a73f4a6764;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 27a4657563..0dac2aaf6c 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.15.3 + * OOjs UI v0.16.3 * 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-02-09T21:21:16Z + * Date: 2016-03-16T19:20:22Z */ ( function ( OO ) { @@ -49,11 +49,15 @@ OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) { isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed(); isActive = element.supports( [ 'isActive' ] ) && element.isActive(); if ( - ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) || - ( !isFramed && element.hasFlag( 'primary' ) ) + ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) ) { + // Button with a dark background, use white icon variants.invert = true; + } else if ( !isFramed && element.isDisabled() ) { + // Frameless disabled button, always use black icon regardless of flags + variants.invert = false; } else { + // Any other kind of button, use the right colored icon if available variants.progressive = element.hasFlag( 'progressive' ); variants.constructive = element.hasFlag( 'constructive' ); variants.destructive = element.hasFlag( 'destructive' );