Commit 07e194811f50c7db85ff092058e633d5e6fd2566
Committed by
Paulo Meireles
1 parent
39b5e40b
Exists in
master
and in
29 other branches
[mezuro] comments are fully working
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
plugins/mezuro/public/javascripts/project_content.js
1 | 1 | var processingTree = false; |
2 | 2 | jQuery(function (){ |
3 | 3 | jQuery('.source-tree-link').live("click", reloadModule); |
4 | - showLoadingProcess(true); | |
4 | + jQuery('[data-show]').live("click", toggle_mezuro); | |
5 | + showLoadingProcess(true); | |
5 | 6 | showProjectContent(); |
6 | 7 | }); |
7 | 8 | |
... | ... | @@ -9,7 +10,8 @@ function showProjectContent() { |
9 | 10 | callAction('project_state', {}, showProjectContentFor); |
10 | 11 | } |
11 | 12 | |
12 | -function toogle(element){ | |
13 | +function toggle_mezuro(){ | |
14 | + var element = jQuery(this).attr('data-show'); | |
13 | 15 | jQuery(element).toggle(); |
14 | 16 | return false; |
15 | 17 | } | ... | ... |
plugins/mezuro/views/content_viewer/_module_result.rhtml
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <% module_result.metric_results.each do |metric_result| %> |
19 | 19 | <% range = metric_result.range %> |
20 | 20 | <tr> |
21 | - <td><a href="#" onClick="toogle('.<%= metric_result.metric.name.delete("() ") %>')";><%= metric_result.metric.name %></a></td> | |
21 | + <td><a href="#" data-show=".<%= 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? %> |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | <td style="background-color: #<%= range.color[2..-1] %>"><%= range.label %></td> |
28 | 28 | <% end %> |
29 | 29 | </tr> |
30 | - <tr class="<%= metric_result.metric.name.delete("() ")%>"> | |
30 | + <tr class="<%= metric_result.metric.name.delete("() ")%>" style="display: none;"> | |
31 | 31 | <td colspan="4" align="right"> |
32 | 32 | <%= range.comments.nil? ? 'comment empty' : range.comments %> |
33 | 33 | </td> | ... | ... |