Commit 398774a9c4d8bbb659a2f131074f77823316df39

Authored by Caio Salgado + Renan Teruo
Committed by Paulo Meireles
1 parent 0737f0cb

[mezuro] comments are now shown and can be hidden (but not unhidden (yet))

plugins/mezuro/public/javascripts/project_content.js
... ... @@ -9,6 +9,11 @@ function showProjectContent() {
9 9 callAction('project_state', {}, showProjectContentFor);
10 10 }
11 11  
  12 +function toogle(element){
  13 + alert(element);
  14 + jQuery(element).hide();
  15 +}
  16 +
12 17 function reloadModule(){
13 18 var module_name = jQuery(this).attr('data-module-name');
14 19 showLoadingProcess(false);
... ...
plugins/mezuro/views/content_viewer/_module_result.rhtml
... ... @@ -17,8 +17,8 @@
17 17 <tbody>
18 18 <% module_result.metric_results.each do |metric_result| %>
19 19 <% range = metric_result.range %>
20   - <tr title="<%= range.nil? ? '' : range.comments %>">
21   - <td><%= metric_result.metric.name %></td>
  20 + <tr>
  21 + <td><a href="#" onClick="toogle('.<%= metric_result.metric.name.delete("() ") %>')";><%= metric_result.metric.name %></a></td>
22 22 <td><%= metric_result.value.slice(/[0-9]+\.[0-9]{1,2}/) %></td> <!--FIXME: Move to helper eventually-->
23 23 <td><%= metric_result.weight %></td>
24 24 <% if range.nil? %>
... ... @@ -26,7 +26,12 @@
26 26 <% else %>
27 27 <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td>
28 28 <% end %>
29   - </tr>
  29 + </tr>
  30 + <tr class="<%= metric_result.metric.name.delete("() ")%>">
  31 + <td colspan="4" align="right">
  32 + <%= range.comments.nil? ? 'comment empty' : range.comments %>
  33 + </td>
  34 + </tr>
30 35 <% end %>
31 36 </tbody>
32 37 <tfoot>
... ...