]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3825 improve URLs generated by IE7
authorSimon Brandhof <simon.brandhof@gmail.com>
Sun, 9 Dec 2012 20:26:18 +0000 (21:26 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Sun, 9 Dec 2012 20:26:18 +0000 (21:26 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb

index 9b3b6d22c9160030f876c1b68a57dadc250b92f4..c176c50aca2d7a20d0820bfebac599932c2343ce 100644 (file)
@@ -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
index 6245780508d7fa11f9e3d6cb14d065622c28da61..6d6c80b2fac350d0dbfd35d047f87fc59309aca4 100644 (file)
@@ -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
 
index fde618491139e973d676dd5970e32c39e8956139..4dd87419063816e2d852ccdd8bc0d74e91393823 100644 (file)
@@ -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 @@
 <ul class="sidebar gray-sidebar">
   <%= render :partial => 'measures/favourites' -%>
 
-  <form id="search-form" method="GET" action="<%= ApplicationController.root_context -%>/measures/search">
+  <form id="search-form" method="GET" action="<%= ApplicationController.root_context -%>/measures/search" onsubmit="submitSearch()">
     <% if @filter.id %>
       <input type="hidden" name="id" value="<%= @filter.id -%>">
     <% end %>
       </select>
     </li>
     <li>
-      <input type="button" name="search" value="<%= message('search_verb') -%>" onclick="submitSearch()" id="search-button">
+      <input type="submit" name="search" value="<%= message('search_verb') -%>" id="search-button">
       <% if @filter.results %>
         <a href="<%= ApplicationController.root_context -%>/measures" class="link-action"><%= message 'measure_filter.new_search' -%></a>
       <% end %>