9c1ca576a6977c5ad3204b2bd7d5e12f0ccc3a77
2 * OOjs UI v0.1.0-pre (837b2f733e)
3 * https://www.mediawiki.org/wiki/OOjs_UI
5 * Copyright 2011–2014 OOjs Team and other contributors.
6 * Released under the MIT license
7 * http://oojs.mit-license.org
9 * Date: 2014-10-11T01:05:29Z
13 * @extends {OO.ui.Theme}
17 OO
.ui
.MediaWikiTheme
= function OoUiMediaWikiTheme() {
19 OO
.ui
.MediaWikiTheme
.super.call( this );
24 OO
.inheritClass( OO
.ui
.MediaWikiTheme
, OO
.ui
.Theme
);
31 OO
.ui
.MediaWikiTheme
.prototype.getElementClasses = function ( element
) {
41 classes
= OO
.ui
.MediaWikiTheme
.super.prototype.getElementClasses
.call( this, element
);
43 if ( element
.isFramed
&& element
.hasFlag
) {
44 if ( element
.isFramed() ) {
46 element
.hasFlag( 'primary' ) ||
47 element
.hasFlag( 'constructive' ) ||
48 element
.hasFlag( 'destructive' )
50 variants
.invert
= true;
53 variants
.primary
= element
.hasFlag( 'primary' );
54 variants
.constructive
= element
.hasFlag( 'constructive' );
55 variants
.destructive
= element
.hasFlag( 'destructive' );
59 for ( variant
in variants
) {
60 classes
[variants
[variant
] ? 'on' : 'off'].push( 'oo-ui-image-' + variant
);
68 OO
.ui
.theme
= new OO
.ui
.MediaWikiTheme();