]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2402 When specifying a review id in the "Reviews" page, all other filter value...
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 19 May 2011 12:50:49 +0000 (14:50 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 19 May 2011 12:50:49 +0000 (14:50 +0200)
Done on Web client side, in Javascript, so that the result is
consistent with what the user sees on the search criteria.

sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb

index c8970c6ebb59a530b0b2357f408733b7167c27d3..9946a4564f88da4df7452fa2aad68bb9fd4ba582 100644 (file)
@@ -1,3 +1,14 @@
+<script>
+function reviewIdFieldModified(field) {
+  if (field.value!='') {
+    $('statuses').value = ''
+    $('severities').value = ''
+    $('projects').value = ''
+    $('authors').value = ''
+    $('assignees').value = ''
+  }
+}
+</script>
 <div id="reviews-search">
   <h1>Reviews</h1>
   <% form_tag({:action => 'index'}, {:method => 'get'}) do %>
@@ -51,7 +62,7 @@
         </td>
         <td width="1%" nowrap>
           <span class="note">Id</span><br/>
-          <%= text_field_tag "review_id", @id, :size => 10 -%>
+          <%= text_field_tag "review_id", @id, :size => 10, :onkeyup => "reviewIdFieldModified(this)" -%>
           <br/>
           <br/>
           <br/>