Commit 2687a750ab1ee2c4fc40970e2815bf0355855507

Authored by Carlos Morais + Paulo Meirelles
Committed by Carlos Morais
1 parent 7542bd25

[mezuro] Call controller with correct module name

module name = project name on first load
plugins/mezuro/public/javascripts/project_content.js
@@ -31,7 +31,8 @@ function showProjectContentFor(state){ @@ -31,7 +31,8 @@ function showProjectContentFor(state){
31 else if (state == 'READY') { 31 else if (state == 'READY') {
32 callAction('project_result', {}, showProjectResult); 32 callAction('project_result', {}, showProjectResult);
33 callAction('project_tree', {}, showProjectTree); 33 callAction('project_tree', {}, showProjectTree);
34 - callAction('module_result', {}, showModuleResult); 34 + var project_name = jQuery("#project-result").attr('data-project-name');
  35 + callAction('module_result', {module_name: project_name}, showModuleResult);
35 } 36 }
36 else if (state.endsWith("ING")) 37 else if (state.endsWith("ING"))
37 showProjectContentAfter(20); 38 showProjectContentAfter(20);
plugins/mezuro/views/content_viewer/show_project.rhtml
@@ -30,7 +30,8 @@ @@ -30,7 +30,8 @@
30 30
31 <br /> 31 <br />
32 32
33 -<div id="project-result" data-profile="<%= @page.profile.identifier %>" data-content="<%= @page.id %>"> 33 +<div id="project-result" data-profile="<%= @page.profile.identifier %>" data-content="<%= @page.id %>"
  34 + data-project-name="<%= @project.name %>">
34 </div> 35 </div>
35 <div id="project-tree"></div> 36 <div id="project-tree"></div>
36 <div id="module-result"> 37 <div id="module-result">