r101645 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101644‎ | r101645 | r101646 >
Date:18:14, 2 November 2011
Author:preilly
Status:resolved (Comments)
Tags:
Comment:
fix for bug 32146 mobilefrontend beta search suggestions: tapping on a blank portion of result line has no effect
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/application.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js
@@ -52,6 +52,7 @@
5353
5454 if ( targ.className == "suggestion-result" ||
5555 targ.className == "search-result-item" ||
 56+ targ.className == "suggestions-result" ||
5657 targ.className == "sq-val-update" ) {
5758 } else {
5859 hideResults();
@@ -155,7 +156,7 @@
156157 var section = sections[i];
157158 var rel = i + 1;
158159 section.value = section.value.replace( /^(?:\/\/|[^\/]+)*\//, '/' );
159 - html = html + "<div class=\"suggestions-result\" rel=\"" + rel + "\" title=\"" + section.label + "\"><a class=\"search-result-item\" href='" + section.value + "'>" + section.label + "</a><a class=\"sq-val-update\" href=\"javascript:sqValUpdate('" + section.label + "');\"> + &nbsp;</a></div>";
 160+ html = html + "<div class=\"suggestions-result\" rel=\"" + rel + "\" title=\"" + section.label + "\"><a class=\"sq-val-update\" href=\"javascript:sqValUpdate('" + section.label + "');\">+</a><a class=\"search-result-item\" href='" + section.value + "'>" + section.label + "</a></div>";
160161 if ( i < ( sections.length - 1 ) ) {
161162 html = html + '<hr />';
162163 }
Index: trunk/extensions/MobileFrontend/stylesheets/common.css
@@ -27,6 +27,7 @@
2828 line-height: 1.8em;
2929 padding: 0.01em 0.25em;
3030 text-align: left;
 31+ postion: relative;
3132 }
3233
3334 .suggestions-result a {
@@ -54,10 +55,14 @@
5556 }
5657 a.sq-val-update {
5758 font-size: 1.3em;
58 - font-weight:normal;
 59+ display: block;
 60+ font-weight: normal;
5961 text-decoration: none;
6062 color: #000000;
61 - float: right;
 63+ position: absolute;
 64+ right: 0;
 65+ width: 1.5em;
 66+ text-align: center;
6267 }
6368 a.sq-val-update:link {
6469 text-decoration: none;
@@ -76,6 +81,11 @@
7782 color:#000000;
7883 }
7984
 85+a.search-result-item {
 86+ display: block;
 87+ margin-right: 2em;
 88+}
 89+
8090 #results {
8191 display: none;
8292 background-color: #ffffff;
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php
@@ -18,7 +18,7 @@
1919 $endScriptTag = '"></script>';
2020 $javaScriptPath = $wgExtensionAssetsPath . '/MobileFrontend/javascripts/';
2121
22 -$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10312011124424' . $endScriptTag : '';
 22+$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=11022011124424' . $endScriptTag : '';
2323
2424 $applicationHtml = <<<EOT
2525 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -27,7 +27,7 @@
2828 <head>
2929 <title>{$htmlTitle}</title>
3030 <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
31 - <link href='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/common.css?version=10282011120827' media='all' rel='Stylesheet' type='text/css' />
 31+ <link href='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/common.css?version=11022011120827' media='all' rel='Stylesheet' type='text/css' />
3232 <link href='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/{$cssFileName}.css?version=10202011120715' media='all' rel='Stylesheet' type='text/css' />
3333 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
3434 <meta name = "viewport" content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

Follow-up revisions

RevisionCommit summaryAuthorDate
r1016471.18wmf1: MFT r101645preilly18:16, 2 November 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   01:43, 13 December 2011

xss were fixed in a later rev.

Status & tagging log