Commit 077b3df7858240a3082a4bcdbdfb388c7cb06c1f
Committed by
Paulo Meireles
1 parent
c86c5c31
Exists in
master
and in
29 other branches
[Mezuro] added button to grade history
Showing
2 changed files
with
8 additions
and
1 deletions
Show diff stats
plugins/mezuro/public/javascripts/project_content.js
| @@ -4,6 +4,7 @@ jQuery(function (){ | @@ -4,6 +4,7 @@ jQuery(function (){ | ||
| 4 | jQuery('.source-tree-link').live("click", reloadModule); | 4 | jQuery('.source-tree-link').live("click", reloadModule); |
| 5 | jQuery('[data-show]').live("click", toggle_mezuro); | 5 | jQuery('[data-show]').live("click", toggle_mezuro); |
| 6 | jQuery('[show-metric-history]').live("click", display_metric_history); | 6 | jQuery('[show-metric-history]').live("click", display_metric_history); |
| 7 | + jQuery('[show-grade-history]').live("click", display_grade_history); | ||
| 7 | showLoadingProcess(true); | 8 | showLoadingProcess(true); |
| 8 | showProjectContent(); | 9 | showProjectContent(); |
| 9 | }); | 10 | }); |
| @@ -20,6 +21,11 @@ function display_metric_history() { | @@ -20,6 +21,11 @@ function display_metric_history() { | ||
| 20 | return false; | 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 | function show_metrics(content) { | 29 | function show_metrics(content) { |
| 24 | jQuery('#historical-' + metricName).html(content); | 30 | jQuery('#historical-' + metricName).html(content); |
| 25 | } | 31 | } |
plugins/mezuro/views/content_viewer/_module_result.rhtml
| @@ -39,11 +39,12 @@ | @@ -39,11 +39,12 @@ | ||
| 39 | </tbody> | 39 | </tbody> |
| 40 | <tfoot> | 40 | <tfoot> |
| 41 | <tr> | 41 | <tr> |
| 42 | - <td colspan = "4" align = "right"> | 42 | + <td colspan = "4" align = "right"> <a href="#" show-grade-history="<%= module_result.grade %>" > |
| 43 | <strong> | 43 | <strong> |
| 44 | <%= _('Grade:') %> | 44 | <%= _('Grade:') %> |
| 45 | <%= "%.02f" % module_result.grade %> | 45 | <%= "%.02f" % module_result.grade %> |
| 46 | </strong> | 46 | </strong> |
| 47 | + </a> | ||
| 47 | </td> | 48 | </td> |
| 48 | </tr> | 49 | </tr> |
| 49 | </tfoot> | 50 | </tfoot> |