Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -16,6 +16,8 @@ |
17 | 17 | * Default cookie lifetime ($wgCookieExpiration) is increased to 180 days. |
18 | 18 | |
19 | 19 | === New features in 1.19 === |
| 20 | +* (bug 30497) Add client-nojs and client-js classes on document element |
| 21 | + to let styles easily hide or show things based on general JS availability |
20 | 22 | * (bug 19838) Possibility to get all interwiki prefixes if the interwiki |
21 | 23 | cache is used. |
22 | 24 | * $wgDnsBlacklistUrls now accepts an array with url and key as the |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2223,7 +2223,7 @@ |
2224 | 2224 | $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' ); |
2225 | 2225 | } |
2226 | 2226 | |
2227 | | - $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir ) ); |
| 2227 | + $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); |
2228 | 2228 | |
2229 | 2229 | if ( $this->getHTMLTitle() == '' ) { |
2230 | 2230 | $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) ); |
Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.startup.js |
— | — | @@ -5,11 +5,13 @@ |
6 | 6 | /* Client profile classes for <html> */ |
7 | 7 | |
8 | 8 | var prof = $.client.profile(); |
9 | | - $( 'html' ).addClass( |
10 | | - 'client-' + prof.name |
11 | | - + ' client-' + prof.name + '-' + prof.versionBase |
12 | | - + ' client-' + prof.layout |
13 | | - + ' client-' + prof.platform |
14 | | - ); |
| 9 | + $( 'html' ) |
| 10 | + .addClass( |
| 11 | + 'client-' + prof.name |
| 12 | + + ' client-' + prof.name + '-' + prof.versionBase |
| 13 | + + ' client-' + prof.layout |
| 14 | + + ' client-' + prof.platform |
| 15 | + + ' client-js' ) |
| 16 | + .removeClass( 'client-nojs' ); |
15 | 17 | |
16 | 18 | } )( jQuery ); |