Commit 077b3df7858240a3082a4bcdbdfb388c7cb06c1f

Authored by João M. M. Silva + Caio Salgado
Committed by Paulo Meireles
1 parent c86c5c31

[Mezuro] added button to grade history

plugins/mezuro/public/javascripts/project_content.js
... ... @@ -4,6 +4,7 @@ jQuery(function (){
4 4 jQuery('.source-tree-link').live("click", reloadModule);
5 5 jQuery('[data-show]').live("click", toggle_mezuro);
6 6 jQuery('[show-metric-history]').live("click", display_metric_history);
  7 + jQuery('[show-grade-history]').live("click", display_grade_history);
7 8 showLoadingProcess(true);
8 9 showProjectContent();
9 10 });
... ... @@ -20,6 +21,11 @@ function display_metric_history() {
20 21 return false;
21 22 }
22 23  
  24 +function display_grade_history() {
  25 + alert(jQuery(this).attr('show-grade-history'));
  26 + return false;
  27 +}
  28 +
23 29 function show_metrics(content) {
24 30 jQuery('#historical-' + metricName).html(content);
25 31 }
... ...
plugins/mezuro/views/content_viewer/_module_result.rhtml
... ... @@ -39,11 +39,12 @@
39 39 </tbody>
40 40 <tfoot>
41 41 <tr>
42   - <td colspan = "4" align = "right">
  42 + <td colspan = "4" align = "right"> <a href="#" show-grade-history="<%= module_result.grade %>" >
43 43 <strong>
44 44 <%= _('Grade:') %>
45 45 <%= "%.02f" % module_result.grade %>
46 46 </strong>
  47 + </a>
47 48 </td>
48 49 </tr>
49 50 </tfoot>
... ...