From 5da7215873152fd52a93c3d91bc38c5dbb32ddce Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 1 Sep 2022 22:45:09 +0300 Subject: [PATCH] Stretch changeset links in history lists --- app/assets/javascripts/index/history.js | 12 ------------ app/assets/stylesheets/common.scss | 7 +++++-- app/views/changesets/_changeset.html.erb | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index 7f0fdf848..c20d342c5 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -10,18 +10,6 @@ OSM.History = function (map) { }) .on("mouseout", "[data-changeset]", function () { unHighlightChangeset($(this).data("changeset").id); - }) - .on("mousedown", "[data-changeset]", function () { - var moved = false; - $(this) - .one("click", function (e) { - if (!moved && !$(e.target).is("a")) { - clickChangeset($(this).data("changeset").id, e); - } - }) - .one("mousemove", function () { - moved = true; - }); }); var group = L.featureGroup() diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index ad0cf48ef..75ed514ee 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -742,10 +742,13 @@ tr.turn:hover { #sidebar .changesets { li { - cursor: pointer; - &.selected { background: $list-highlight; } /* color is derived from changeset bbox fillColor in history.js */ + + a:not(.stretched-link), [title] { + position: relative; + z-index: 1; + } } .comments { diff --git a/app/views/changesets/_changeset.html.erb b/app/views/changesets/_changeset.html.erb index 40ee4212a..f3aaf38ea 100644 --- a/app/views/changesets/_changeset.html.erb +++ b/app/views/changesets/_changeset.html.erb @@ -12,7 +12,7 @@ <%= tag.li :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data }, :class => "list-group-item" do %>

- + <%= changeset.tags["comment"].to_s.presence || t("browse.no_comment") %>

-- 2.43.2