r100851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100850‎ | r100851 | r100852 >
Date:19:28, 26 October 2011
Author:preilly
Status:ok (Comments)
Tags:
Comment:
search suggestions
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/common.css (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js
@@ -67,11 +67,13 @@
6868 if ( !sections || sections.length < 1 ) {
6969 results.innerHTML = "No results";
7070 } else {
71 - var html = '';
 71+ var html = '<div class="suggestions-results">';
7272 for ( i = 0; i < sections.length; i++ ) {
7373 var section = sections[i];
74 - html = html + "<a href='" + section.value + "'>" + section.label + "</a><br/>";
 74+ var rel = i + 1;
 75+ html = html + "<div class=\"suggestions-result\" rel=\"" + rel + "\" title=\"" + section.label + "\"><a href='" + section.value + "'>" + section.label + "</a></div>";
7576 }
 77+ html = html + '</div>';
7678 results.innerHTML = html;
7779 }
7880 }
\ No newline at end of file
Index: trunk/extensions/MobileFrontend/stylesheets/common.css
@@ -15,6 +15,41 @@
1616 display: none;
1717 }
1818
 19+.suggestions-results {
 20+ font-size: 0.8em;
 21+ cursor: pointer;
 22+}
 23+
 24+.suggestions-result {
 25+ color: black;
 26+ color: WindowText;
 27+ margin: 0;
 28+ line-height: 1.5em;
 29+ padding: 0.01em 0.25em;
 30+ text-align: left;
 31+}
 32+
 33+.suggestions-result a {
 34+ text-decoration: none;
 35+ color: #000000;
 36+}
 37+.suggestions-result a:link {
 38+ text-decoration: none;
 39+ color:#000000;
 40+}
 41+.suggestions-result a:visited {
 42+ text-decoration: none;
 43+ color:#000000;
 44+}
 45+.suggestions-result a:hover {
 46+ text-decoration: none;
 47+ color:#000000;
 48+}
 49+.suggestions-result a:active {
 50+ text-decoration: none;
 51+ color:#000000;
 52+}
 53+
1954 #results {
2055 display: none;
2156 background-color: #ffffff;

Follow-up revisions

RevisionCommit summaryAuthorDate
r100854mft r100851preilly19:33, 26 October 2011

Comments

#Comment by G.Hagedorn (talk | contribs)   21:00, 26 October 2011

applied to 1.18wmf1, please consider tagging for 1.18

Status & tagging log