From 3bfc5e42da61f742c5f781638cb8818ab2e5ba1e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 9 Apr 2017 09:39:59 +0000 Subject: For 3 comments or more, show reply link at top of comments as well (#24089). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16539 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5c593a06f..29bc54157 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -237,6 +237,7 @@ module ApplicationHelper def toggle_link(name, id, options={}) onclick = "$('##{id}').toggle(); " onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ") + onclick << "$(window).scrollTop($('##{options[:focus]}').position().top); " if options[:scroll] onclick << "return false;" link_to(name, "#", :onclick => onclick) end -- cgit v1.2.3