r95318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95317‎ | r95318 | r95319 >
Date:18:33, 23 August 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
* (bug 30497) Add client-nojs and client-js classes on document element to let styles easily hide or show things based on general JS availability

Patch by John Du Hart - https://bugzilla.wikimedia.org/attachment.cgi?id=8956
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/resources/mediawiki.page/mediawiki.page.startup.js (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -16,6 +16,8 @@
1717 * Default cookie lifetime ($wgCookieExpiration) is increased to 180 days.
1818
1919 === 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
2022 * (bug 19838) Possibility to get all interwiki prefixes if the interwiki
2123 cache is used.
2224 * $wgDnsBlacklistUrls now accepts an array with url and key as the
Index: trunk/phase3/includes/OutputPage.php
@@ -2223,7 +2223,7 @@
22242224 $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' );
22252225 }
22262226
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' ) );
22282228
22292229 if ( $this->getHTMLTitle() == '' ) {
22302230 $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) );
Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.startup.js
@@ -5,11 +5,13 @@
66 /* Client profile classes for <html> */
77
88 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' );
1517
1618 } )( jQuery );

Follow-up revisions

RevisionCommit summaryAuthorDate
r98001SpecialMoodBarFeedback: Add nojs paging links...catrope13:52, 24 September 2011
r981521.18wmf1: MFT r93912, r95318, r97403, r97650, r97657, r97661, r97687, r97777catrope18:13, 26 September 2011
r984461.18: MFT r93912, r95318, r96139reedy20:59, 29 September 2011
r98447Followup r98446, move RELEASE-NOTES from r95318reedy21:00, 29 September 2011
r103856Followup r95318, move client-(no)js classes to the body tag per discussion in...johnduhart22:53, 21 November 2011

Comments

#Comment by Vigilius (talk | contribs)   20:13, 26 September 2011

please tag for 1.18 as well.

#Comment by Johnduhart (talk | contribs)   01:10, 29 September 2011

Tagged.

Status & tagging log