From 749d86666ce4cc1e8ecfe36f20a960e105d24f35 Mon Sep 17 00:00:00 2001 From: Caio Salgado + Renan Teruo Date: Wed, 11 Apr 2012 15:40:17 -0300 Subject: [PATCH] [mezuro] HTML page now talks with javascript about date. Controller verifies date, but doesn't know date yet. --- plugins/mezuro/public/javascripts/project_content.js | 6 ++++++ plugins/mezuro/views/content_viewer/_project_result.rhtml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/mezuro/public/javascripts/project_content.js b/plugins/mezuro/public/javascripts/project_content.js index af4466b..5c3ca12 100644 --- a/plugins/mezuro/public/javascripts/project_content.js +++ b/plugins/mezuro/public/javascripts/project_content.js @@ -25,6 +25,12 @@ function reloadModule(){ return false; } +function reloadProject(date){ + callAction('project_result', {date: date}, showProjectResult); + callAction('project_tree', {date: date}, showProjectTree); + callAction('module_result', {date: date}, showModuleResult); +} + function showProjectContentFor(state){ if (state == 'ERROR') callAction('project_error', {}, showProjectResult); diff --git a/plugins/mezuro/views/content_viewer/_project_result.rhtml b/plugins/mezuro/views/content_viewer/_project_result.rhtml index 08a3792..af6c815 100644 --- a/plugins/mezuro/views/content_viewer/_project_result.rhtml +++ b/plugins/mezuro/views/content_viewer/_project_result.rhtml @@ -1,4 +1,4 @@ -Project history <%=select_tag "projectHistory",options_for_select(history)%> +Project history <%=select_tag "projectHistory",options_for_select(history), :onChange=>'reloadProject(this.value)'%>

<%= _('Result') %>

-- libgit2 0.21.2