aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-03-03 16:15:36 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-03-03 16:15:46 +0100
commit6170ed8660463ce8e80bd678cee4883810157988 (patch)
tree89bff5f6e2534d1073cfd95a9fcc255d59dafd71
parent40eb62e293a469571e041d99be84a3ce66a965cd (diff)
downloadsonarqube-6170ed8660463ce8e80bd678cee4883810157988.tar.gz
sonarqube-6170ed8660463ce8e80bd678cee4883810157988.zip
SONAR-5057 remove usage of prototypejs
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb4
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb7
2 files changed, 3 insertions, 8 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb
index 03e8907cfb2..d41f4eea279 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb
@@ -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>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
index 6fe5dcf44a5..1c639992ad2 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
@@ -22,15 +22,12 @@
<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 {