From: Simon Brandhof Date: Fri, 14 Dec 2012 17:22:59 +0000 (+0100) Subject: SONAR-3825 Check "Favourites only" by default when added to criteria X-Git-Tag: 3.4~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8317be2653b7f1aa950de11b859048efe2e829f0;p=sonarqube.git SONAR-3825 Check "Favourites only" by default when added to criteria --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb index b0f8aabdf68..df581e6d3a3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb @@ -37,7 +37,10 @@ if (e.val == 'lang' || e.val == 'project') { $j("#select-" + e.val).select2("enable"); $j("#select-" + e.val).select2("focus"); + } else if (e.val=='fav') { + $j('#check-fav').attr('checked', 'checked'); } + if (e.val == 'metric') { if (hiddenConditionIndexes.length > 0) { var index = hiddenConditionIndexes.pop(); @@ -115,7 +118,7 @@
  • class="marginbottom5"> <%= message 'measure_filter.criteria.only_favourites' %>: - <%= check_box_tag 'onFavourites', 'true', @filter.criteria['onFavourites']=='true' -%> + <%= check_box_tag 'onFavourites', 'true', @filter.criteria['onFavourites']=='true', :id => 'check-fav' -%>
  • <% condition_metrics = Metric.all.select { |m| m.numeric? && !m.hidden } %> @@ -146,14 +149,28 @@