From bd8814de21bac8d2363c8f0fd46c9ec47e2fafb8 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 9 Dec 2012 21:26:18 +0100 Subject: [PATCH] SONAR-3825 improve URLs generated by IE7 --- .../main/resources/org/sonar/l10n/core.properties | 1 + .../WEB-INF/app/controllers/measures_controller.rb | 1 - .../WEB-INF/app/views/measures/_sidebar.html.erb | 13 ++++++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 9b3b6d22c91..c176c50aca2 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -383,6 +383,7 @@ measure_filter.shared_with_all_users=Shared with all users measure_filter.private=Private measure_filter.manage.shared_filters=Shared Filters measure_filter.manage.my_filters=My Filters +measure_filter.criteria.what=What? measure_filter.criteria.age=Age measure_filter.criteria.date=Date measure_filter.criteria.only_favourites=Favourites only diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb index 6245780508d..6d6c80b2fac 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb @@ -22,7 +22,6 @@ class MeasuresController < ApplicationController # GET /measures/index def index @filter = MeasureFilter.new - @filter.set_criteria_value(:qualifiers, 'TRK') render :action => 'search' end 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 fde61849113..4dd87419063 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 @@ -11,9 +11,8 @@ function submitSearch() { // remove empty parameters from URL var form = $j("#search-form"); - form.find(':input[value=""]').attr('name', ''); - form.submit(); - return false; + form.find(':input[value=""]').remove(); + return true; } function removeUrlAttr(url, attribute_key) { var regexp = new RegExp("&?" + attribute_key + "=([^&]$|[^&]*)", "g"); @@ -29,8 +28,8 @@ } var hiddenConditionIndexes = [<%= hidden_condition_indexes.join(',') -%>]; $j(document).ready(function () { - $j('#select-lang').select2({allowClear: true, width: '100%', placeholder: '<%= message 'measure_filter.languages' -%>'}); - $j('#select-qualifiers').select2({allowClear: true, width: '100%', placeholder: 'Resources'}); + $j('#select-lang').select2({allowClear: true, width: '100%', placeholder: '<%= escape_javascript message 'measure_filter.languages' -%>'}); + $j('#select-qualifiers').select2({allowClear: true, width: '100%', placeholder: '<%= escape_javascript message('measure_filter.criteria.what') -%>'}); $j('#more-criteria') .select2({allowClear: true, width: '100%', placeholder: '<%= message 'measure_filter.more_criteria' -%>'}) .on("change", function (e) { @@ -59,7 +58,7 @@