summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-06-20 07:07:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-06-20 07:07:22 +0000
commitb132b8e914c5612218bb161af19aa916b18deab3 (patch)
tree154933794125163c63050d37fa01613e7a1aede7 /public
parentd4312d25656283d34202cede73e9e1fff61a7db6 (diff)
downloadredmine-b132b8e914c5612218bb161af19aa916b18deab3.tar.gz
redmine-b132b8e914c5612218bb161af19aa916b18deab3.zip
Show issue history in tabs (#3058).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18272 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/application.js38
1 files changed, 35 insertions, 3 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index cf74818a7..eac6df7d3 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -353,12 +353,44 @@ function showTab(name, url) {
$('#tab-content-' + name).show();
$('#tab-' + name).closest('.tabs').find('a').removeClass('selected');
$('#tab-' + name).addClass('selected');
- //replaces current URL with the "href" attribute of the current link
- //(only triggered if supported by browser)
+
+ replaceInHistory(url)
+
+ return false;
+}
+
+function showIssueHistory(journal, url) {
+ tab_content = $('#tab-content-history');
+ tab_content.parent().find('.tab-content').hide();
+ tab_content.show();
+ tab_content.parent().find('div.tabs a').removeClass('selected');
+
+ $('#tab-' + journal).addClass('selected');
+
+ replaceInHistory(url)
+
+ switch(journal) {
+ case 'notes':
+ tab_content.find('.journal:not(.has-notes)').hide();
+ tab_content.find('.journal.has-notes').show();
+ break;
+ case 'properties':
+ tab_content.find('.journal.has-notes').hide();
+ tab_content.find('.journal:not(.has-notes)').show();
+ break;
+ default:
+ tab_content.find('.journal').show();
+ }
+
+ return false;
+}
+
+//replaces current URL with the "href" attribute of the current link
+//(only triggered if supported by browser)
+function replaceInHistory(url) {
if ("replaceState" in window.history) {
window.history.replaceState(null, document.title, url);
}
- return false;
}
function moveTabRight(el) {