diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-07 10:22:18 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-07 10:22:18 +0100 |
commit | 9f87e6241991b316046721b43dcdba07dae68b62 (patch) | |
tree | bfad1e91aeab2de7f72ac023e255217ef0014220 /sonar-server | |
parent | 0866a80e49464f235de6bae7507b313f721789fc (diff) | |
download | sonarqube-9f87e6241991b316046721b43dcdba07dae68b62.tar.gz sonarqube-9f87e6241991b316046721b43dcdba07dae68b62.zip |
Do not display 'New window' in popup mode
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb | 4 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/test_controller.rb | 4 | ||||
-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/WEB-INF/app/views/resource/index.html.erb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb (renamed from sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb) | 0 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb (renamed from sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb) | 0 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/javascripts/resource.js | 2 |
7 files changed, 11 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index 50e25733cea..61b14bd0254 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -37,6 +37,7 @@ class ResourceController < ApplicationController access_denied unless has_role?(:user, @resource) @snapshot=@resource.last_snapshot + @popup_mode = params[:popup] == 'true' if @snapshot load_extensions() @@ -63,7 +64,10 @@ class ResourceController < ApplicationController else render_resource_deleted() end + # popup mode else + # Always display title in popup mode + @params_opts = '&popup=true&display_title=true' params[:layout] = 'false' render :action => 'index' end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/test_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/test_controller.rb index 2d8f4e25125..388cb8d3782 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/test_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/test_controller.rb @@ -27,7 +27,7 @@ class TestController < ApplicationController @test = params[:test].to_s @test_plan = java_facade.testPlan(snapshot_id) @test_case = @test_plan.testCasesByName(@test).first - render :partial => 'test/testcase_working_view' + render :partial => 'test/testcase' end def testable @@ -45,7 +45,7 @@ class TestController < ApplicationController test_cases << test_case @test_case_by_test_plan[test_plan] = test_cases end - render :partial => 'test/testable_working_view' + render :partial => 'test/testable' end end
\ No newline at end of file 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 a1b01446a25..bcd361042d6 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 @@ -30,9 +30,11 @@ </li> <% first=false end %> + <% unless @popup_mode %> <li class="<%= 'first' if first -%>"> <a href="<%= ApplicationController.root_context -%>/resource/index/<%= @resource.key -%>?display_title=true" onclick="window.open(this.href,'resource','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= message('new_window') -%></a> </li> + <% end %> </ul> <ul class="tabs2"> <% @extensions.each do |extension| %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb index 4991755d32b..4372f5fd24c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb @@ -1,5 +1,5 @@ <div id="accordion-panel"/> <script type="text/javascript"> - openAccordionItem('<%= request.request_uri -%>', this); + openAccordionItem('<%= request.request_uri + @params_opts.to_s -%>', this); </script>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb index 9af43f406b7..9af43f406b7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb index f3a2f968311..f3a2f968311 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb diff --git a/sonar-server/src/main/webapp/javascripts/resource.js b/sonar-server/src/main/webapp/javascripts/resource.js index 5f5347d2d4a..de24fde7194 100644 --- a/sonar-server/src/main/webapp/javascripts/resource.js +++ b/sonar-server/src/main/webapp/javascripts/resource.js @@ -187,6 +187,7 @@ function hVF(elt, line) { Functions used in tests viewer */ function expandTests(index, elt){ + expandAccordionItem(elt); var parent = $j(elt).closest('.test_name_'+index); parent.find(".test_expandLink_"+ index).hide(); parent.find(".test_collapseLink_"+ index).show(); @@ -194,6 +195,7 @@ function expandTests(index, elt){ } function collapseTests(index, elt){ + expandAccordionItem(elt); var parent = $j(elt).closest('.test_name_'+index); parent.find(".test_collapseLink_"+ index).hide(); parent.find(".test_expandLink_"+ index).show(); |