]> git.openstreetmap.org Git - rails.git/commitdiff
Use Bootstrap actionable items in query results
authorAnton Khorev <tony29@yandex.ru>
Wed, 17 Apr 2024 01:09:04 +0000 (04:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 24 Apr 2024 00:44:35 +0000 (03:44 +0300)
app/assets/javascripts/index/query.js
app/assets/stylesheets/common.scss

index 59c3a8b495c29638e57cd25ca677b064009f9b98..313bd1cc00618506e7e0e6e76143577f381f3d75 100644 (file)
@@ -216,7 +216,7 @@ OSM.Query = function (map) {
 
           if (interestingFeature(element)) {
             var $li = $("<li>")
 
           if (interestingFeature(element)) {
             var $li = $("<li>")
-              .addClass("query-result list-group-item")
+              .addClass("query-result list-group-item list-group-item-action")
               .data("geometry", featureGeometry(element))
               .text(featurePrefix(element) + " ")
               .appendTo($ul);
               .data("geometry", featureGeometry(element))
               .text(featurePrefix(element) + " ")
               .appendTo($ul);
@@ -230,14 +230,14 @@ OSM.Query = function (map) {
 
         if (results.remark) {
           $("<li>")
 
         if (results.remark) {
           $("<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 }))
             .appendTo($ul);
         }
 
         if ($ul.find("li").length === 0) {
           $("<li>")
             .text(I18n.t("javascripts.query.error", { server: url, error: results.remark }))
             .appendTo($ul);
         }
 
         if ($ul.find("li").length === 0) {
           $("<li>")
-            .addClass("query-result list-group-item")
+            .addClass("query-result list-group-item list-group-item-action")
             .text(I18n.t("javascripts.query.nothing_found"))
             .appendTo($ul);
         }
             .text(I18n.t("javascripts.query.nothing_found"))
             .appendTo($ul);
         }
@@ -246,7 +246,7 @@ OSM.Query = function (map) {
         $section.find(".loader").hide();
 
         $("<li>")
         $section.find(".loader").hide();
 
         $("<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 }))
           .appendTo($ul);
       }
           .text(I18n.t("javascripts.query." + status, { server: url, error: error }))
           .appendTo($ul);
       }
index cf616983e29f708b68bbf32f8ed90980d578974d..d3399420b7652c2a04b686c4b7cff1f92aa67873 100644 (file)
@@ -640,10 +640,6 @@ tr.turn {
         &.query-result {
           cursor: pointer;
         }
         &.query-result {
           cursor: pointer;
         }
-
-        &.selected {
-          background: $list-highlight;
-        }
       }
     }
   }
       }
     }
   }