Commit 2687a750ab1ee2c4fc40970e2815bf0355855507
Committed by
Carlos Morais
1 parent
7542bd25
Exists in
master
and in
29 other branches
[mezuro] Call controller with correct module name
module name = project name on first load
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
plugins/mezuro/public/javascripts/project_content.js
... | ... | @@ -31,7 +31,8 @@ function showProjectContentFor(state){ |
31 | 31 | else if (state == 'READY') { |
32 | 32 | callAction('project_result', {}, showProjectResult); |
33 | 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 | 37 | else if (state.endsWith("ING")) |
37 | 38 | showProjectContentAfter(20); | ... | ... |
plugins/mezuro/views/content_viewer/show_project.rhtml
... | ... | @@ -30,7 +30,8 @@ |
30 | 30 | |
31 | 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 | 35 | </div> |
35 | 36 | <div id="project-tree"></div> |
36 | 37 | <div id="module-result"> | ... | ... |