Use Bootstrap actionable items in query results

This commit is contained in:
Anton Khorev 2024-04-17 04:09:04 +03:00
parent 3c2780f2c3
commit 0bd034a8e9
2 changed files with 4 additions and 8 deletions

View file

@ -216,7 +216,7 @@ OSM.Query = function (map) {
if (interestingFeature(element)) { if (interestingFeature(element)) {
var $li = $("<li>") var $li = $("<li>")
.addClass("query-result list-group-item") .addClass("query-result list-group-item list-group-item-action")
.data("geometry", featureGeometry(element)) .data("geometry", featureGeometry(element))
.text(featurePrefix(element) + " ") .text(featurePrefix(element) + " ")
.appendTo($ul); .appendTo($ul);
@ -230,14 +230,14 @@ OSM.Query = function (map) {
if (results.remark) { if (results.remark) {
$("<li>") $("<li>")
.addClass("query-result list-group-item") .addClass("query-result list-group-item list-group-item-action")
.text(I18n.t("javascripts.query.error", { server: url, error: results.remark })) .text(I18n.t("javascripts.query.error", { server: url, error: results.remark }))
.appendTo($ul); .appendTo($ul);
} }
if ($ul.find("li").length === 0) { if ($ul.find("li").length === 0) {
$("<li>") $("<li>")
.addClass("query-result list-group-item") .addClass("query-result list-group-item list-group-item-action")
.text(I18n.t("javascripts.query.nothing_found")) .text(I18n.t("javascripts.query.nothing_found"))
.appendTo($ul); .appendTo($ul);
} }
@ -246,7 +246,7 @@ OSM.Query = function (map) {
$section.find(".loader").hide(); $section.find(".loader").hide();
$("<li>") $("<li>")
.addClass("query-result list-group-item") .addClass("query-result list-group-item list-group-item-action")
.text(I18n.t("javascripts.query." + status, { server: url, error: error })) .text(I18n.t("javascripts.query." + status, { server: url, error: error }))
.appendTo($ul); .appendTo($ul);
} }

View file

@ -640,10 +640,6 @@ tr.turn {
&.query-result { &.query-result {
cursor: pointer; cursor: pointer;
} }
&.selected {
background: $list-highlight;
}
} }
} }
} }