X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/479b22ca772c4a128ab7d4ff33cf6a7aba320be2..e329bf37c03d11eb32bed0fd0927bcbb76c316fc:/app/assets/javascripts/index/query.js diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 80df594c8..6b64ee8ee 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -1,3 +1,5 @@ +//= require jquery.simulate + OSM.Query = function(map) { var queryButton = $(".control-query .control-button"), uninterestingTags = ['source', 'source_ref', 'source:ref', 'history', 'attribution', 'created_by', 'tiger:county', 'tiger:tlid', 'tiger:upload_uuid'], @@ -27,6 +29,11 @@ OSM.Query = function(map) { var geometry = $(this).data("geometry") if (geometry) map.removeLayer(geometry); $(this).removeClass("selected"); + }) + .on("click", ".query-results li", function (e) { + if (!$(e.target).is('a')) { + $(this).find("a").simulate("click", e); + } }); function interestingFeature(feature, origin) { @@ -159,7 +166,6 @@ OSM.Query = function(map) { .data("geometry", featureGeometry(element, nodes)) .appendTo($ul); var $p = $("

") - .addClass("inner12 search_results_entry clearfix") .text(featurePrefix(element) + " ") .appendTo($li);