]> source.dussan.org Git - redmine.git/commitdiff
use document.referrer instead of history.length (#13697)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 May 2013 07:21:56 +0000 (07:21 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 24 May 2013 07:21:56 +0000 (07:21 +0000)
Contributed by Filou Centrinov.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11900 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/journals/diff.html.erb

index ac17e090ac465a54c5fac37c4b50df0dd21e3c68..d28ee0f71afb0159096838e43d4c9af445eaa93f 100644 (file)
@@ -7,7 +7,7 @@
 
 <p>
   <%= link_to(l(:button_back), issue_path(@issue),
-              :onclick => 'if (history.length > 1) {history.back(); return false;}') %>
+              :onclick => 'if (document.referrer != "") {history.back(); return false;}') %>
 </p>
 
 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>