r111651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111650‎ | r111651 | r111652 >
Date:17:07, 16 February 2012
Author:jdlrobson
Status:ok (Comments)
Tags:
Comment:
display sections for people without javascript (addresses #34025)

this sets the class of the body tag to jsEnabled for browsers
with javascript. Css takes care of the rest by showing the sections
and hiding the buttons for those without.
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/application.js (modified) (history)
  • /trunk/extensions/MobileFrontend/javascripts/beta_application.js (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/iphone.css (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_application.js
@@ -1,3 +1,4 @@
 2+document.body.className = "jsEnabled";
23 var search = document.getElementById( 'search' );
34 var clearSearch = document.getElementById( 'clearsearch' );
45 var results = document.getElementById( 'results' );
Index: trunk/extensions/MobileFrontend/javascripts/application.js
@@ -1,3 +1,4 @@
 2+document.body.className = "jsEnabled";
23 var search = document.getElementById( 'search' );
34 var clearSearch = document.getElementById( 'clearsearch' );
45 var results = document.getElementById( 'results' );
Index: trunk/extensions/MobileFrontend/stylesheets/common.css
@@ -304,4 +304,18 @@
305305 color: #000000;
306306 -webkit-margin-after: 0.5em;
307307 margin: 0px;
308 -}
\ No newline at end of file
 308+}
 309+
 310+button.show {
 311+ display: none;
 312+}
 313+
 314+.jsEnabled button.show {
 315+ display: inline-block;
 316+}
 317+
 318+.jsEnabled .content_block,
 319+.jsEnabled .section_anchors,
 320+button.section_heading.hide {
 321+ display: none;
 322+}
Index: trunk/extensions/MobileFrontend/stylesheets/iphone.css
@@ -300,12 +300,6 @@
301301 background-color: #ddeeff;
302302 }
303303
304 -.content_block,
305 -.section_anchors,
306 -button.section_heading.hide {
307 - display: none;
308 -}
309 -
310304 #clearButton {
311305 display: none;
312306 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r111655update beta_common.css to reflect changes in r111651...jdlrobson17:43, 16 February 2012
r112102use utils to add class to body...jdlrobson12:16, 22 February 2012
r112121fix regression in javascript disabled view...jdlrobson17:34, 22 February 2012

Comments

#Comment by Preilly (talk | contribs)   12:44, 17 February 2012

Should we possibly add the ability to set multiple class names?

Status & tagging log