From 8317be2653b7f1aa950de11b859048efe2e829f0 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 14 Dec 2012 18:22:59 +0100 Subject: [PATCH] SONAR-3825 Check "Favourites only" by default when added to criteria --- .../app/views/measures/_sidebar.html.erb | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) 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 @@
  • -- 2.39.5