From fbe722465dfea80e0295b2fb35d832c89612ae4d Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Fri, 27 Apr 2012 08:55:11 +0100 Subject: [PATCH] individual ids/classes for geocoder search results --- WebContent/base/OSRM.Geocoder.js | 12 +++---- WebContent/main.css | 61 +++++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/WebContent/base/OSRM.Geocoder.js b/WebContent/base/OSRM.Geocoder.js index 4d8808501..15f781418 100644 --- a/WebContent/base/OSRM.Geocoder.js +++ b/WebContent/base/OSRM.Geocoder.js @@ -84,20 +84,20 @@ _showResults: function(response, parameters) { // show possible results for input var html = ""; - html += ''; + html += '
'; for(var i=0; i < response.length; i++){ var result = response[i]; //odd or even ? - var rowstyle='description-body-odd'; - if(i%2==0) { rowstyle='description-body-even'; } + var rowstyle='results-body-odd'; + if(i%2==0) { rowstyle='results-body-even'; } html += ''; - html += ''; - html += ''; + html += '"; } diff --git a/WebContent/main.css b/WebContent/main.css index 6b82ca619..dde98e404 100644 --- a/WebContent/main.css +++ b/WebContent/main.css @@ -269,7 +269,54 @@ html, body { } -/* style for information-box table (search results, driving directions) */ +/* style for information-box table (general) */ +.no-results +{ + text-align:center; + margin:28px; +} + + +/* style for information-box table (search results) */ +.results +{ + border-spacing:0px; + width:100%; +} +.results-body-odd +{ + background-color: #FFFDE3; +} +.results-body-even +{ + background-color: #FFF9BB; +} +.results-body-counter +{ + text-align:right; + vertical-align:top; + font-weight:bold; + padding:1px 5px 1px 5px; +} +.results-body-items +{ + text-align:left; + vertical-align: middle; + width:100%; + padding:1px; +} +.results-body-item +{ + cursor:pointer; + color:#000000 +} +.results-body-item:hover +{ + color:#ff0000 +} + + +/* style for information-box table (driving directions) */ .description { border-spacing:0px; @@ -283,13 +330,6 @@ html, body { { background-color: #FFF9BB; } -.description-body-counter -{ - text-align:right; - vertical-align:top; - font-weight:bold; - padding:1px 5px 1px 5px; -} .description-body-items { text-align:left; @@ -324,11 +364,6 @@ html, body { { color:#ff0000 } -.no-results -{ - text-align:center; - margin:28px; -} /* buttons */
'+(i+1)+'.'; + html += ''+(i+1)+'.'; if(result.display_name){ - html += '
'+result.display_name+'
'; + html += '
'+result.display_name+'
'; } html += "