diff options
7 files changed, 13 insertions, 13 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb index b30592b268d..41bd55e2458 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb @@ -157,7 +157,7 @@ class IssuesController < ApplicationController def bulk_change verify_post_request Internal.issues.bulkChange(params, params[:comment]) - render :text => params[:issues_query_params], :status => 200 + render :text => '', :status => 200 end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb index 097babb7f52..cbd8542835a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb @@ -13,7 +13,7 @@ } // refresh page after issues bulk change - function onBulkIssues(issues_query_params, component_key){ + function onBulkIssues(issues_query_params){ window.location.reload(); } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb index f076a1c8d58..cd7ccad3ee4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb @@ -13,8 +13,8 @@ } // refresh page after issues bulk change - function onBulkIssues(issues_query_params, component_key){ - d(component_key); + function onBulkIssues(issues_query_params){ + d(issues_query_params['components']); closeModalWindow(); } </script> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb index 43d066db14f..8ffbb27f2dd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb @@ -4,11 +4,7 @@ issues = issues_result.issues max_page_size_reached = issues_result.issues.size >= issues_result.paging.pageSize() - component_key = issue_query.components.to_a.first if issue_query.components and issue_query.components.size == 1 project_key = issue_query.componentRoots.to_a.first if issue_query.componentRoots and issue_query.componentRoots.size == 1 - if params[:from] == 'drilldown' && !project_key - project_key = Project.by_key(component_key).root_project.kee - end transitions_by_issues = {} unresolved_issues = 0 @@ -24,7 +20,6 @@ %> <form id="bulk-change-form" method="post" action="<%= ApplicationController.root_context -%>/issues/bulk_change"> <input type="hidden" name="issues" value="<%= issues.map { |issue| issue.key() }.join(',') -%>"> - <input type="hidden" name="issues_query_params" value="<%= params.to_query -%>"> <input type="hidden" name="actions[]" id="bulk-change-transition-action"> <fieldset> <div class="modal-head"> @@ -117,8 +112,8 @@ </form> <script> $j("#bulk-change-form").modalForm({ - success: function (data) { - onBulkIssues(data, '<%= component_key %>'); + success: function () { + onBulkIssues(<%= params.to_json -%>); }, error: function (xhr, textStatus, errorThrown) { $j('#bulk-change-loading-image').addClass("hidden"); diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb index dd06fe00f3c..371258b449d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb @@ -59,6 +59,6 @@ <script type="text/javascript"> function onBulkIssues(issues_query_params, component_key){ - window.location = baseUrl + '/issues/search?' + issues_query_params; + window.location = baseUrl + '/issues/search?' + jQuery.param(issues_query_params); } </script>
\ 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 cacbdfd7fba..a30c805539e 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 @@ -24,7 +24,7 @@ <% first=true %> <% if logged_in? && @display_issues %> <li class="<%= 'first' if first -%>"> - <a href="<%= url_for @issues_params.merge({:controller => 'issues', :action => 'bulk_change_form'}) -%>" + <a href="<%= url_for @issues_params.merge({:controller => 'issues', :action => 'bulk_change_form', 'componentRoots' => @resource.root ? @resource.root.key : nil}) -%>" class="bulk-change-link open-modal"><%= message('bulk_change') -%></a> </li> <% first=false 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 f5f81a21fe3..654a2df04a3 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 @@ -8,4 +8,9 @@ // Always display title in popup mode openAccordionItem('<%= url_for(params.merge({:display_title => 'true', :popup => 'true'})) -%>', this); }); + + // refresh page after issues bulk change + function onBulkIssues(issues_query_params){ + window.location.reload(); + } </script>
\ No newline at end of file |