]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2388 Be able to search for 'false-positive' reviews
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 1 Jun 2011 07:05:50 +0000 (09:05 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 1 Jun 2011 07:05:50 +0000 (09:05 +0200)
Change the way to display false positives on the result page.

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

index 65698bb2fc0f3b45a07c6f22c3d470514556584e..a470efb0b65525bf613a7a61708a392bb21249ad 100644 (file)
@@ -70,10 +70,9 @@ function launchSearch(columnName, link) {
           <%= user_autocomplete_field "assignee_id", @assignee_id, { :class => "max-width" } -%>
           <br/>
           <br/>
-          <select name="false_positives" id="false_positives" class="withIcons" onchange="if(this.value=='only' || this.value=='with') {$('assignee_id').value = ''; $('autocompleteText-assignee_id').value = '';};">
-            <option <%= 'selected' if @false_positives=='without' -%> value="without" class="sel-without-false-positives">Without false positives</option>
-            <option <%= 'selected' if @false_positives=='only' -%> value="only" class="sel-only-false-positives">Only false positives</option>
-            <option <%= 'selected' if @false_positives=='with' -%> value="with" class="sel-with-false-positives">With false positives</option>
+          <select name="false_positives" id="false_positives" onchange="if(this.value=='only' || this.value=='with') {$('assignee_id').value = ''; $('autocompleteText-assignee_id').value = '';};">
+            <option <%= 'selected' if @false_positives=='without' -%> value="without">Without false positives</option>
+            <option <%= 'selected' if @false_positives=='only' -%> value="only">Only false positives</option>
           </select>
         </td>
         <td width="1%" style="padding-left: 20px" nowrap>
@@ -100,6 +99,9 @@ function launchSearch(columnName, link) {
   <%
      if @reviews && !@reviews.empty?
   %>
+    <% if @false_positives=='only' %>
+    <div style="color:#777777; font-size:93%; padding: 4px 0px 4px 10px;">Showing <span class="falsePositive">false positives</span> only</div>
+    <% end %>
     <table id="reviews-list" class="data width100">
       <thead>
       <tr>
@@ -125,7 +127,6 @@ function launchSearch(columnName, link) {
           <a href="#" onClick="launchSearch('updated_at', this)">Age</a>
           <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'updated_at' -%>
         </th>
-
       </tr>
       </thead>
       <tfoot>
@@ -147,7 +148,7 @@ function launchSearch(columnName, link) {
           <td>
             <%= link_to h(review.title), :controller => "reviews", :action => "view", :id => review.id -%>
             <div class="comment-excerpt">
-              <img src="<%= ApplicationController.root_context -%>/images/reviews/<%= review.false_positive ? "false_positive" : "comment" -%>.png" title="<%= 'False positive' if review.false_positive -%>"/>
+              <img src="<%= ApplicationController.root_context -%>/images/reviews/comment.png"/>
               &nbsp;<b><%= comment.user.name -%> :</b> 
               <%= comment.excerpt -%>
                </div>            
index 3b137d5fd6a5c0a39b56f9c0fc4d34c83f0b0c5a..f0246a34b58e11c8da56590d56b0e5ff25ea15dc 100644 (file)
@@ -909,15 +909,6 @@ div.comment-excerpt {
 .max-width {
   width: 100%;
 }
-option.sel-with-false-positives {
-  background-image: url('../images/reviews/with_false_positives.png');
-}
-option.sel-only-false-positives {
-  background-image: url('../images/reviews/false_positive.png');
-}
-option.sel-without-false-positives {
-  background-image: url('../images/reviews/comment.png');
-}
 
 
 /* AUTOCOMPLETE FIELDS */