]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/query.js
Remove action item class from non-action query results
[rails.git] / app / assets / javascripts / index / query.js
index e44db9fdf0d012b4b8a3bd1f237c160e283cbabc..08da06d4c6270070da88dbe7051319ceb4b53d31 100644 (file)
@@ -125,7 +125,7 @@ OSM.Query = function (map) {
 
   function featureName(feature) {
     var tags = feature.tags,
-        locales = I18n.locales.get();
+        locales = OSM.preferred_languages;
 
     for (var i = 0; i < locales.length; i++) {
       if (tags["name:" + locales[i]]) {
@@ -216,7 +216,7 @@ OSM.Query = function (map) {
 
           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);
@@ -230,14 +230,14 @@ OSM.Query = function (map) {
 
         if (results.remark) {
           $("<li>")
-            .addClass("query-result list-group-item")
+            .addClass("list-group-item")
             .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("list-group-item")
             .text(I18n.t("javascripts.query.nothing_found"))
             .appendTo($ul);
         }
@@ -246,7 +246,7 @@ OSM.Query = function (map) {
         $section.find(".loader").hide();
 
         $("<li>")
-          .addClass("query-result list-group-item")
+          .addClass("list-group-item")
           .text(I18n.t("javascripts.query." + status, { server: url, error: error }))
           .appendTo($ul);
       }