From aa5fbf4ba1d91eb075a3ab738a4ed06e9d059f9e Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 29 Mar 2013 11:47:08 -0400 Subject: [PATCH] better style for geocoder not found message fixes #1194 --- css/app.css | 4 ++++ js/id/ui/geocoder.js | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/css/app.css b/css/app.css index 21b84470b..3dfee787d 100644 --- a/css/app.css +++ b/css/app.css @@ -1556,6 +1556,10 @@ img.wiki-image { border-bottom: 1px solid #CCC; padding: 5px 10px; } +.geocode-control div.map-overlay span.not-found { + line-height: 28px; + width: 100%; +} .geocode-control a:focus { text-decoration: underline; diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index 42689c0d3..1dc7b84dc 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -22,12 +22,13 @@ iD.ui.Geocoder = function(context) { inputNode.classed('loading', false); if (err) return hide(); if (!resp.length) { - return iD.ui.flash(context.container()) - .select('.content') - .append('h3') - .text(t('geocoder.no_results', {name: searchVal})); + resultsList.html('') + .call(iD.ui.Toggle(true)) + .append('span') + .attr('class', 'not-found') + .text(t('geocoder.no_results', {name: searchVal})); } else if (resp.length > 1) { - var spans = resultsList.selectAll('span') + var spans = resultsList.html('').selectAll('span') .data(resp, function(d) { return d.place_id; }); spans.enter()