]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4492 Error when clicking on Activate/Deactivate all in quality profile when...
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 9 Aug 2013 13:33:37 +0000 (15:33 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 9 Aug 2013 13:33:45 +0000 (15:33 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb

index f5920233220010cc071c085986512824230b0209..f1b85a44719dc596978f168e07fa4b0c2f0e8dc5 100644 (file)
@@ -11,6 +11,7 @@
       $j('#bulk-form').reset();
     } else {
       $j('#bulk-form').submit();
+      $j('#select-bulk-change').select2('disable');
     }
     return !localModifications;
   }
          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"
           <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>