summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-09 09:39:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-09 09:39:59 +0000
commit3bfc5e42da61f742c5f781638cb8818ab2e5ba1e (patch)
tree90e5949ba12a9f4f0d71b83e472af0ceedb82ce2 /app/helpers
parentd3b70f5eb9109061f935b975eba2efdce8ead580 (diff)
downloadredmine-3bfc5e42da61f742c5f781638cb8818ab2e5ba1e.tar.gz
redmine-3bfc5e42da61f742c5f781638cb8818ab2e5ba1e.zip
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
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb1
1 files changed, 1 insertions, 0 deletions
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