diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2013-05-02 16:09:58 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2013-05-02 16:09:58 +0000 |
commit | 501007f01d0d7b41ec78455ee29b989e523fb32b (patch) | |
tree | 298872e904ca5df7f3b0f552819e627e23b86435 /public/javascripts/application.js | |
parent | 8aa1bdc0316042af210dc1d62608e9e39fdc6902 (diff) | |
download | redmine-501007f01d0d7b41ec78455ee29b989e523fb32b.tar.gz redmine-501007f01d0d7b41ec78455ee29b989e523fb32b.zip |
Update URL when changing tab (#13900).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11765 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r-- | public/javascripts/application.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 758a74765..46a00d09a 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -290,11 +290,16 @@ function submit_query_form(id) { $('#'+id).submit(); } -function showTab(name) { +function showTab(name, url) { $('div#content .tab-content').hide(); $('div.tabs a').removeClass('selected'); $('#tab-content-' + name).show(); $('#tab-' + name).addClass('selected'); + //replaces current URL with the "href" attribute of the current link + //(only triggered if supported by browser) + if ("replaceState" in window.history) { + window.history.replaceState(null, document.title, url); + } return false; } |