Commit 398774a9c4d8bbb659a2f131074f77823316df39
Committed by
Paulo Meireles
1 parent
0737f0cb
Exists in
master
and in
29 other branches
[mezuro] comments are now shown and can be hidden (but not unhidden (yet))
Showing
2 changed files
with
13 additions
and
3 deletions
Show diff stats
plugins/mezuro/public/javascripts/project_content.js
@@ -9,6 +9,11 @@ function showProjectContent() { | @@ -9,6 +9,11 @@ function showProjectContent() { | ||
9 | callAction('project_state', {}, showProjectContentFor); | 9 | callAction('project_state', {}, showProjectContentFor); |
10 | } | 10 | } |
11 | 11 | ||
12 | +function toogle(element){ | ||
13 | + alert(element); | ||
14 | + jQuery(element).hide(); | ||
15 | +} | ||
16 | + | ||
12 | function reloadModule(){ | 17 | function reloadModule(){ |
13 | var module_name = jQuery(this).attr('data-module-name'); | 18 | var module_name = jQuery(this).attr('data-module-name'); |
14 | showLoadingProcess(false); | 19 | showLoadingProcess(false); |
plugins/mezuro/views/content_viewer/_module_result.rhtml
@@ -17,8 +17,8 @@ | @@ -17,8 +17,8 @@ | ||
17 | <tbody> | 17 | <tbody> |
18 | <% module_result.metric_results.each do |metric_result| %> | 18 | <% module_result.metric_results.each do |metric_result| %> |
19 | <% range = metric_result.range %> | 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 | <td><%= metric_result.value.slice(/[0-9]+\.[0-9]{1,2}/) %></td> <!--FIXME: Move to helper eventually--> | 22 | <td><%= metric_result.value.slice(/[0-9]+\.[0-9]{1,2}/) %></td> <!--FIXME: Move to helper eventually--> |
23 | <td><%= metric_result.weight %></td> | 23 | <td><%= metric_result.weight %></td> |
24 | <% if range.nil? %> | 24 | <% if range.nil? %> |
@@ -26,7 +26,12 @@ | @@ -26,7 +26,12 @@ | ||
26 | <% else %> | 26 | <% else %> |
27 | <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> | 27 | <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> |
28 | <% end %> | 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 | <% end %> | 35 | <% end %> |
31 | </tbody> | 36 | </tbody> |
32 | <tfoot> | 37 | <tfoot> |