From: Tom Hughes Date: Thu, 16 Jan 2020 11:42:12 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/2509' X-Git-Tag: live~3298 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d122ea16f8dc45bc4c4e004f37eb2d1b96df52d4?hp=379bf785bea575c6519226ed5bbbe53e540bd795 Merge remote-tracking branch 'upstream/pull/2509' --- diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 514d6dbb2..7d02760ce 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -228,12 +228,14 @@ OSM.Query = function (map) { if (results.remark) { $("
  • ") + .addClass("query-result list-group-item") .text(I18n.t("javascripts.query.error", { server: url, error: results.remark })) .appendTo($ul); } if ($ul.find("li").length === 0) { $("
  • ") + .addClass("query-result list-group-item") .text(I18n.t("javascripts.query.nothing_found")) .appendTo($ul); } @@ -242,6 +244,7 @@ OSM.Query = function (map) { $section.find(".loader").stopTime("loading").hide(); $("
  • ") + .addClass("query-result list-group-item") .text(I18n.t("javascripts.query." + status, { server: url, error: error })) .appendTo($ul); } diff --git a/app/assets/javascripts/index/search.js b/app/assets/javascripts/index/search.js index ba66f4782..9ed243466 100644 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@ -45,9 +45,9 @@ OSM.Search = function (map) { $("#sidebar_content") .on("click", ".search_more a", clickSearchMore) .on("click", ".search_results_entry a.set_position", clickSearchResult) - .on("mouseover", "p.search_results_entry:has(a.set_position)", showSearchResult) - .on("mouseout", "p.search_results_entry:has(a.set_position)", hideSearchResult) - .on("mousedown", "p.search_results_entry:has(a.set_position)", function () { + .on("mouseover", "li.search_results_entry:has(a.set_position)", showSearchResult) + .on("mouseout", "li.search_results_entry:has(a.set_position)", hideSearchResult) + .on("mousedown", "li.search_results_entry:has(a.set_position)", function () { var moved = false; $(this).one("click", function (e) { if (!moved && !$(e.target).is("a")) { diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index abae98392..5635e3f9d 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -939,15 +939,8 @@ header .search_forms, /* Rules for search sidebar */ #sidebar .search_results_entry { - ul { - padding: 0; - } - ul li { - border-bottom: $keyline; cursor: pointer; - list-style-type: none; - &:first-child { border-top: $keyline; } &.selected { background: $list-highlight; } } diff --git a/app/views/geocoder/results.html.erb b/app/views/geocoder/results.html.erb index deec4ed39..94f19d2fe 100644 --- a/app/views/geocoder/results.html.erb +++ b/app/views/geocoder/results.html.erb @@ -1,9 +1,13 @@ <% if @results.empty? %> -

    <%= t ".no_results" %>

    + <% else %> -