r112131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112130‎ | r112131 | r112132 >
Date:18:53, 22 February 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
use css to grow #nav box when large menu

although not a like for like replacement
this provides pretty much the same effect as the
javascript code and something like this should be
done in css for javascript disabled users.
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/application.js (modified) (history)
  • /trunk/extensions/MobileFrontend/javascripts/beta_application.js (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/common.css (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_application.js
@@ -76,16 +76,8 @@
7777 }
7878
7979 function logoClick() {
80 - var n = document.getElementById( 'nav' ).style, newWidth;
 80+ var n = document.getElementById( 'nav' ).style;
8181 n.display = n.display === 'block' ? 'none' : 'block';
82 - if (n.display === 'block') {
83 - if ( languageSelection ) {
84 - if ( languageSelection.offsetWidth > 175 ) {
85 - newWidth = languageSelection.offsetWidth + 30;
86 - n.width = newWidth + 'px';
87 - }
88 - }
89 - }
9082 }
9183 initClearSearchLink();
9284 search.onpaste = function() {
Index: trunk/extensions/MobileFrontend/javascripts/application.js
@@ -67,16 +67,8 @@
6868 }
6969
7070 function logoClick() {
71 - var n = document.getElementById( 'nav' ).style, newWidth;
 71+ var n = document.getElementById( 'nav' ).style;
7272 n.display = n.display === 'block' ? 'none' : 'block';
73 - if (n.display === 'block') {
74 - if ( languageSelection ) {
75 - if ( languageSelection.offsetWidth > 175 ) {
76 - newWidth = languageSelection.offsetWidth + 30;
77 - n.width = newWidth + 'px';
78 - }
79 - }
80 - }
8173 }
8274 initClearSearchLink();
8375 utilities( document.getElementById( 'logo' ) ).bind( 'click', logoClick );
Index: trunk/extensions/MobileFrontend/stylesheets/common.css
@@ -594,15 +594,19 @@
595595 -moz-border-radius: 2px;
596596 clear: both;
597597 display: none;
598 - width: 172px;
599598 border: 1px solid #cccccc;
600599 border-top: 0px;
601600 margin: -1px 0 0 0;
602601 background: white;
603602 padding: 0 5px 5px 5px;
604603 position: relative;
 604+ float: left;
605605 }
606606
 607+#languageselection {
 608+ margin-right: 35px;
 609+}
 610+
607611 #nav form,
608612 #nav button {
609613 display: inline-block;
Index: trunk/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -595,15 +595,19 @@
596596 clear: both;
597597 padding: 5px 0;
598598 display: none;
599 - width: 172px;
600599 border: 1px solid #cccccc;
601600 border-top: 0px;
602601 margin: -1px 0 0 0;
603602 background: white;
604603 padding: 0 5px 5px 5px;
605604 position: relative;
 605+ float: left;
606606 }
607607
 608+#languageselection {
 609+ margin-right: 35px;
 610+}
 611+
608612 #nav form,
609613 #nav button {
610614 display: inline-block;

Status & tagging log