diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2013-10-15 11:03:38 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2013-10-15 11:38:44 +0200 |
commit | eaecd1dd9be703e44374aaa2199564314363c380 (patch) | |
tree | f09ed19b549d5310d531009bcfa4e3f8d4e05a75 /sonar-server | |
parent | 84282e52514357b8aa554f590ace80dd20c6d9f5 (diff) | |
download | sonarqube-eaecd1dd9be703e44374aaa2199564314363c380.tar.gz sonarqube-eaecd1dd9be703e44374aaa2199564314363c380.zip |
SONAR-4062 Pass period parameter around in component tabs
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/javascripts/resource.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb index f22077f1ca6..657b69ddc70 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb @@ -40,7 +40,7 @@ <ul class="tabs2"> <% @extensions.each do |extension| %> <li> - <a href="#" onclick="return loadResourceViewer('<%= @resource.id -%>','<%= extension.getId() -%>',<%= display_title -%>, this)" + <a href="#" onclick="return loadResourceViewer('<%= @resource.id -%>','<%= extension.getId() -%>',<%= display_title -%>,'<%= params[:period] -%>', this)" class="<%= 'selected' if @extension && @extension.getId()==extension.getId() -%>"><%= message(extension.getId() + '.page', :default => extension.getTitle()) %></a> </li> <% end %> diff --git a/sonar-server/src/main/webapp/javascripts/resource.js b/sonar-server/src/main/webapp/javascripts/resource.js index 45efcf8a270..fbdcf590f29 100644 --- a/sonar-server/src/main/webapp/javascripts/resource.js +++ b/sonar-server/src/main/webapp/javascripts/resource.js @@ -2,12 +2,12 @@ Functions used in resource viewers */ -function loadResourceViewer(resourceId, tab, display_title, elt) { +function loadResourceViewer(resourceId, tab, display_title, period, elt) { if (display_title == undefined) { display_title = true; } - var url = baseUrl + '/resource/index/' + resourceId + '?tab=' + tab + '&display_title=' + display_title; + var url = baseUrl + '/resource/index/' + resourceId + '?tab=' + tab + '&display_title=' + display_title + '&period=' + period; openAccordionItem(url, elt, true); return false; @@ -54,4 +54,4 @@ function highlight_usages(event){ var selectedClass = selectedElementClasses[0]; $j("#" + event.data.id + " span." + selectedClass).addClass("highlighted"); } -}
\ No newline at end of file +} |