Commit 087a62e6de6a7f49b9efd41ab1f3ea06cc829d66
Committed by
Paulo Meireles
1 parent
749d8666
Exists in
master
and in
29 other branches
[mezuro] Javascript actually reloads page after changing dates. Controller now k…
…nows date, and should talk with Kalibro with different dates.
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
... | ... | @@ -16,11 +16,19 @@ class MezuroPluginProfileController < ProfileController |
16 | 16 | end |
17 | 17 | |
18 | 18 | def project_result |
19 | + | |
20 | + date = params[:date] | |
19 | 21 | |
20 | 22 | content = profile.articles.find(params[:id]) |
21 | 23 | project_result = content.project_result |
22 | 24 | project = content.project |
23 | 25 | |
26 | + if date_verify(date) | |
27 | + client = Kalibro::Client::ProjectResultClient.new | |
28 | + if client.has_results_before(project.name, date) | |
29 | + project_result = client.last_result_before(project.name, date) | |
30 | + end | |
31 | + end | |
24 | 32 | history = project_history project |
25 | 33 | |
26 | 34 | render :partial => 'content_viewer/project_result', :locals => { :project_result => project_result, :history => history } | ... | ... |
plugins/mezuro/public/javascripts/project_content.js
... | ... | @@ -26,6 +26,7 @@ function reloadModule(){ |
26 | 26 | } |
27 | 27 | |
28 | 28 | function reloadProject(date){ |
29 | + showLoadingProcess(true); | |
29 | 30 | callAction('project_result', {date: date}, showProjectResult); |
30 | 31 | callAction('project_tree', {date: date}, showProjectTree); |
31 | 32 | callAction('module_result', {date: date}, showModuleResult); | ... | ... |