Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -193,6 +193,7 @@ |
194 | 194 | $tpl->set( 'displaytitle', $wgOut->mPageLinkTitle ); |
195 | 195 | $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() ) ); |
196 | 196 | $tpl->set( 'talkclass', ( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->getNamespace() == NS_SPECIAL ? "ns-special" : "ns-subject" ) ) ); |
| 197 | + $tpl->set( 'skinnameclass', ( "skin-" . Sanitizer::escapeClass( $this->getSkinName ( ) ) ) ); |
197 | 198 | |
198 | 199 | $nsname = isset( $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] ) ? |
199 | 200 | $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] : |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -591,7 +591,8 @@ |
592 | 592 | 'mediawiki ns-'.$wgTitle->getNamespace(). |
593 | 593 | ' '.( $wgContLang->isRTL() ? "rtl" : "ltr" ). |
594 | 594 | ' '.Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ). |
595 | | - ' '.( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->getNamespace() == NS_SPECIAL ? "ns-special" : "ns-subject" ) ) ); |
| 595 | + ' '.( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->getNamespace() == NS_SPECIAL ? "ns-special" : "ns-subject" ) ) ). |
| 596 | + ' skin-'. Sanitizer::escapeClass( $this->getSkinName( ) ); |
596 | 597 | return $a; |
597 | 598 | } |
598 | 599 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -91,6 +91,7 @@ |
92 | 92 | allows having the unprefixed page title as the default category sortkey |
93 | 93 | * (bug 15079) Add class="ns-talk" / "ns-subject" to <body>. Also added ns-special to |
94 | 94 | special pages. |
| 95 | +* (bug 15052) Skins should add their name as a class in <body> |
95 | 96 | |
96 | 97 | === API changes in 1.14 === |
97 | 98 | |
Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | </head> |
106 | 106 | <body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> |
107 | 107 | <?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?> |
108 | | - class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('talkclass') ?>"> |
| 108 | + class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('talkclass') ?> <?php $this->text('skinnameclass') ?>"> |
109 | 109 | <div id="globalWrapper"> |
110 | 110 | <div id="column-content"> |
111 | 111 | <div id="content"> |
Index: trunk/phase3/skins/Modern.php |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | </head> |
97 | 97 | <body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> |
98 | 98 | <?php if($this->data['body_onload' ]) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?> |
99 | | - class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('talkclass') ?>"> |
| 99 | + class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('talkclass') ?> <?php $this->text('skinnameclass') ?>"> |
100 | 100 | |
101 | 101 | <!-- heading --> |
102 | 102 | <div id="mw_header"><h1 id="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div> |