r101709 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101708‎ | r101709 | r101710 >
Date:21:38, 2 November 2011
Author:preilly
Status:resolved (Comments)
Tags:
Comment:
partial fix for bug 30985 mobile header expanding and menu do not work until page loads
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/application.js (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/application.js
@@ -45,10 +45,7 @@
4646 }
4747 }
4848
49 -// I don't think this makes sense. Loading this here means that this button
50 -// won't function until the page is loaded. It would probably be an
51 -// improvement to just attach an onclick straight into the html.
52 -document.getElementById( 'logo' ).onclick = function() {
 49+function logoClick() {
5350 var n = document.getElementById( 'nav' ).style;
5451 n.display = n.display == 'block' ? 'none' : 'block';
5552 if (n.display == 'block') {
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -16,10 +16,12 @@
1717 $languageSelectionText = '<b>' . self::$messages['mobile-frontend-language'] . ':</b><br/>';
1818 $languageSelectionDiv = ( self::$isBetaGroupMember ) ? '<div id="languageselectionsection">' . $languageSelectionText . $languageSelection . '</div>' : '';
1919
 20+$logoOnClick = (self::$device['supports_javascript']) ? 'onclick="javascript:logoClick();"' : '';
 21+
2022 $searchWebkitHtml = <<<EOD
2123 <div id='header'>
2224 <div id='searchbox'>
23 - <img width="35" height="22" alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' />
 25+ <img width="35" height="22" alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' {$logoOnClick} />
2426 <form action='{$scriptUrl}' class='search_bar' method='get' {$searchBoxDisplayNone}>
2527 <input type="hidden" value="Special:Search" name="title" />
2628 <div id="sq" class="divclearable">

Follow-up revisions

RevisionCommit summaryAuthorDate
r101710update version number for application javascriptpreilly21:43, 2 November 2011
r1017111.18wmf1: MFT r101709 - r101710preilly21:44, 2 November 2011
r101714fix spacingpreilly21:48, 2 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97556fix for Bug 30985 - Mobile header expanding and menu do not work until page l...preilly20:58, 19 September 2011

Comments

#Comment by Preilly (talk | contribs)   21:49, 2 November 2011

Spacing is now fixed in r101714.

Status & tagging log