Commit 86d9a42295266184ccbe3ebd9c6ee17b3faed5f7
Committed by
Rafael Manzo
1 parent
677a9558
Exists in
master
and in
23 other branches
[Mezuro] processing.js reviwed (only comments removed)
Showing
1 changed file
with
8 additions
and
26 deletions
Show diff stats
plugins/mezuro/public/javascripts/processing.js
... | ... | @@ -2,9 +2,9 @@ var processingTree = false; |
2 | 2 | var metricName; |
3 | 3 | jQuery(function (){ |
4 | 4 | jQuery('.source-tree-link').live("click", reloadModule); |
5 | - jQuery('[show-metric-history]').live("click", display_metric_history); //TODO review for project history | |
6 | - jQuery('[show-grade-history]').live("click", display_grade_history); //TODO review for project history | |
7 | - jQuery('#project_date_submit').live("click", reloadProcessingWithDate); //TODO review for project history | |
5 | + jQuery('[show-metric-history]').live("click", display_metric_history); | |
6 | + jQuery('[show-grade-history]').live("click", display_grade_history); | |
7 | + jQuery('#project_date_submit').live("click", reloadProcessingWithDate); | |
8 | 8 | showLoadingProcess(true); |
9 | 9 | showProcessing(); |
10 | 10 | }); |
... | ... | @@ -14,7 +14,6 @@ function showProcessing() { |
14 | 14 | callAction('processing', 'state', {repository_id: repository_id}, showProcessingFor); |
15 | 15 | } |
16 | 16 | |
17 | -//TODO review for project history | |
18 | 17 | function display_metric_history() { |
19 | 18 | var module_result_id = jQuery(this).attr('data-module-id'); |
20 | 19 | var formatted_name = jQuery(this).attr('show-metric-history'); |
... | ... | @@ -25,7 +24,6 @@ function display_metric_history() { |
25 | 24 | return false; |
26 | 25 | } |
27 | 26 | |
28 | -//TODO review for project history | |
29 | 27 | function display_grade_history() { |
30 | 28 | var module_result_id = jQuery(this).attr('data-module-id'); |
31 | 29 | toggle_mezuro("#historical-grade"); |
... | ... | @@ -33,12 +31,10 @@ function display_grade_history() { |
33 | 31 | return false; |
34 | 32 | } |
35 | 33 | |
36 | -//TODO review for project history | |
37 | 34 | function show_metrics(content) { |
38 | 35 | jQuery('#historical-' + metricName).html(content); |
39 | 36 | } |
40 | 37 | |
41 | -//TODO review for project history | |
42 | 38 | function show_grades(content) { |
43 | 39 | jQuery('#historical-grade').html(content); |
44 | 40 | } |
... | ... | @@ -48,31 +44,27 @@ function toggle_mezuro(element){ |
48 | 44 | return false; |
49 | 45 | } |
50 | 46 | |
51 | -//TODO Waiting for ModuleResultController refactoring | |
52 | 47 | function reloadModule(){ |
53 | 48 | var module_result_id = jQuery(this).attr('data-module-id'); |
54 | 49 | showLoadingProcess(false); |
55 | 50 | processingTree = true; |
56 | -// callAction('module_result', 'project_tree', {results_root_id: results_root_id }, showProjectTree); | |
57 | 51 | callAction('module_result', 'module_result', {module_result_id: module_result_id}, showModuleResult); |
58 | 52 | return false; |
59 | 53 | } |
60 | 54 | |
61 | -//TODO review for project history | |
62 | 55 | function reloadProcessingWithDate(date){ |
63 | 56 | reloadProcessing(date + "T00:00:00+00:00"); |
64 | 57 | return false; |
65 | 58 | } |
66 | 59 | |
67 | -//TODO review for project history | |
68 | 60 | function reloadProcessing(date){ |
69 | 61 | repository_id = processingData('repository-id'); |
70 | 62 | showLoadingProcess(true); |
71 | 63 | |
72 | 64 | callAction('processing', 'processing', {date: date, repository_id: repository_id}, function(content){ |
73 | 65 | showReadyProcessing(content); |
74 | - var module_result_id = jQuery("#module_result_root_id").attr('module_result_root_id'); //TODO Waiting for ModuleResultController refactoring | |
75 | - callAction('module_result', 'module_result', {module_result_id: module_result_id}, showModuleResult); //TODO Waiting for ModuleResultController refactoring | |
66 | + var module_result_id = jQuery("#module_result_root_id").attr('module_result_root_id'); | |
67 | + callAction('module_result', 'module_result', {module_result_id: module_result_id}, showModuleResult); | |
76 | 68 | } |
77 | 69 | ); |
78 | 70 | } |
... | ... | @@ -88,8 +80,8 @@ function showProcessingFor(state){ |
88 | 80 | jQuery('#processing-state').html('<div style="color:Green">READY</div>'); |
89 | 81 | callAction('processing', 'processing', {repository_id: repository_id}, function(content){ |
90 | 82 | showReadyProcessing(content); |
91 | - var module_result_id = jQuery("#module_result_root_id").attr('module_result_root_id'); //TODO Waiting for ModuleResultController refactoring | |
92 | - callAction('module_result', 'module_result', {module_result_id: module_result_id}, showModuleResult); //TODO Waiting for ModuleResultController refactoring | |
83 | + var module_result_id = jQuery("#module_result_root_id").attr('module_result_root_id'); | |
84 | + callAction('module_result', 'module_result', {module_result_id: module_result_id}, showModuleResult); | |
93 | 85 | } |
94 | 86 | ); |
95 | 87 | } |
... | ... | @@ -112,18 +104,8 @@ function showReadyProcessing(content) { |
112 | 104 | jQuery('#processing').html(content); |
113 | 105 | } |
114 | 106 | |
115 | -//function showProjectTree(content){ | |
116 | -// processingTree = false; | |
117 | -// jQuery('#project-tree').html(content); | |
118 | -// return false; | |
119 | -//} | |
120 | - | |
121 | -//TODO Waiting for ModuleResultController refactoring | |
122 | 107 | function showModuleResult(content){ |
123 | -// if (processingTree != true){ | |
124 | 108 | jQuery('#module-result').html(content); |
125 | -// } | |
126 | -// return false; | |
127 | 109 | } |
128 | 110 | |
129 | 111 | function callAction(controller, action, params, callback){ |
... | ... | @@ -147,4 +129,4 @@ function sourceNodeToggle(id){ |
147 | 129 | var suffixes = ['_hidden', '_plus', '_minus']; |
148 | 130 | for (var i in suffixes) |
149 | 131 | jQuery('#' + id + suffixes[i]).toggle(); |
150 | 132 | -} |
133 | +} | |
151 | 134 | \ No newline at end of file | ... | ... |