]> source.dussan.org Git - redmine.git/commitdiff
Note URLs should highlight the linked note (#22978).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 8 Jul 2017 14:56:19 +0000 (14:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 8 Jul 2017 14:56:19 +0000 (14:56 +0000)
Patch by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16776 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/show.html.erb
public/stylesheets/application.css

index 3da22d4afd9c0970a7db213f4984b79cbeeb457b..46494ff9f78636a52c565d0dd610ccbfc323d9c1 100644 (file)
@@ -167,3 +167,14 @@ end %>
 <% end %>
 
 <%= context_menu %>
+
+<%= javascript_tag do %>
+$(document).ready(function(){
+  $(window).on('load hashchange',function(){
+    var hash = location.hash;
+    if (hash.match(/^#(change|note)-\d+$/)){
+      $('div' + hash).addClass('highlight').removeClass('highlight', 2000)
+    }
+  });
+});
+<% end %>
index 519773bb282a39a4c32896f3695cf4512080d0be..9dce0dca4218e8f42c864af9522ae5c88e208b3c 100644 (file)
@@ -760,6 +760,7 @@ div.thumbnails {margin:0.6em;}
 div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;}
 div.thumbnails img {margin: 3px; vertical-align: middle;}
 #history div.thumbnails {margin-left: 2em;}
+#history div.highlight {background-color: #ffffdd;}
 
 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
 .other-formats span + span:before { content: "| "; }