diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-08-09 15:33:37 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-08-09 15:33:45 +0200 |
commit | 0730debe2e278c092b570a937baa497abf80eeac (patch) | |
tree | 6a858b787bc13fae84e5aa7e107b69e804dd9834 | |
parent | e44bea6acce0ad8a47bfd6f58205b71b1995600a (diff) | |
download | sonarqube-0730debe2e278c092b570a937baa497abf80eeac.tar.gz sonarqube-0730debe2e278c092b570a937baa497abf80eeac.zip |
SONAR-4492 Error when clicking on Activate/Deactivate all in quality profile when no rule is selected
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb index f5920233220..f1b85a44719 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb @@ -11,6 +11,7 @@ $j('#bulk-form').reset(); } else { $j('#bulk-form').submit(); + $j('#select-bulk-change').select2('disable'); } return !localModifications; } @@ -107,7 +108,7 @@ onClick="return downloadCsv()" id="download-link" class=""><%= message('download_verb') -%></a> </div> </li> - <% if enable_modification %> + <% if enable_modification && @rules.size>0 %> <li class="marginleft10"> <div class="bulk-edit"><%= message('bulk_change') -%>: <form action="<%= ApplicationController.root_context -%>/rules_configuration/bulk_edit" method="POST" id="bulk-form" @@ -116,7 +117,7 @@ <input type="hidden" name="bulk_rule_ids" value="<%= @rules.map{|r| r.id}.join(',') -%>"/> <%= dropdown_tag "bulk_action", options_for_select([ ["", ""], [message('activate_all'), "activate"], [message('deactivate_all'), "deactivate"] ], ''), { :width => '110px' - }, {:onChange => 'submitBulkForm()'} -%> + }, {:onChange => 'submitBulkForm()', :id => 'select-bulk-change'} -%> </form> </div> </li> |