]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5057 remove usage of prototypejs
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 3 Mar 2014 15:15:36 +0000 (16:15 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 3 Mar 2014 15:15:46 +0000 (16:15 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb

index 03e8907cfb2a14e5f3ff06bcd553bfcfc83cb30f..d41f4eea27933e64c8907ac5775b77071de466c8 100644 (file)
@@ -54,9 +54,7 @@ complexity=measure('complexity')
  <script type='text/javascript'>
    //<![CDATA[
    function selectComplexity(metric) {
-     $j('#cmp_charts .chart').each(function(index,chart) {
-       chart.hide();
-     });
+     $j('#cmp_charts .chart').hide();
      $j('#chart_' + metric).show();
    }
  </script>
index 6fe5dcf44a5351d49d2c2955d7b6c9c185ee28ac..1c639992ad20ebd28d8bd4632a6818db5dbdd711 100644 (file)
 
 <script type="text/javascript">
   function showMostViolatedRules<%= widget.id -%>(severity) {
-    divs = $j('#block_<%= widget.id-%> div.hotspot');
-    for (i = 0; i < divs.size(); i++) {
-      divs[i].hide();
-    }
+    $j('#block_<%= widget.id-%> div.hotspot').hide();
     $j('#most-violated-rules-<%= widget.id -%>-' + severity).show();
   }
 
   function severityForLink() {
-    var severity = $F('select-severity_<%= widget.id -%>');
+    var severity = $j('select-severity_<%= widget.id -%>').val();
     if (severity == 'all') {
       return '';
     } else {