r113469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113468‎ | r113469 | r113470 >
Date:14:54, 9 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
search suggestions as list

style search suggestions as a list
- it's a list so why not use list elements
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js
@@ -185,12 +185,12 @@
186186 search.focus();
187187 }
188188 if ( !sections || sections.length < 1 ) {
189 - results.innerHTML = "<div class=\"suggestions-results\" title=\"No Results\">No Results</div>";
 189+ results.innerHTML = '<ul class="suggestions-results" title="No Results"><li class="suggestions-result">No Results</li></div>';
190190 } else {
191191 if( results.firstChild ) {
192192 results.removeChild( results.firstChild );
193193 }
194 - suggestions = document.createElement( 'div' );
 194+ suggestions = document.createElement( 'ul' );
195195 suggestions.className = 'suggestions-results';
196196 results.appendChild( suggestions );
197197 suggestionListener = function() {
@@ -200,7 +200,7 @@
201201
202202 for ( i = 0; i < sections.length; i++ ) {
203203 section = sections[i];
204 - suggestionsResult = document.createElement( 'div' );
 204+ suggestionsResult = document.createElement( 'li' );
205205 link = document.createElement( 'a' );
206206 suggestionsResult.setAttribute( 'title', section.label );
207207 suggestionsResult.className = 'suggestions-result';

Follow-up revisions

RevisionCommit summaryAuthorDate
r114200r113463, r113465, r113466, r113469, r113470, r113471, r113472awjrichards22:16, 19 March 2012

Status & tagging log