diff --git a/plugins/mezuro/public/javascripts/results.js b/plugins/mezuro/public/javascripts/results.js index 48445f8..0948c70 100644 --- a/plugins/mezuro/public/javascripts/results.js +++ b/plugins/mezuro/public/javascripts/results.js @@ -4,11 +4,19 @@ function results($) { var project = $('#module-result').attr('data-project-id'); var module_name = $(this).attr('data-module-name'); var endpoint = '/profile/' + profile + '/plugins/mezuro/metrics/' + project; - // FIXME turn on the 'loading ...' - $.get(endpoint, { module_name: module_name }, function(content) { + show_loading_message(); + $.get(endpoint, {module_name: module_name}, function(content) { $('#module-result').html(content); - // FIXME turn off the 'loading ...' + show_result_table(); }); return false; }); -}; \ No newline at end of file +} +function show_loading_message() { + jQuery('#loading-message').attr("style", "display: inline"); + jQuery('#module-result').attr("style", "display: none"); +} +function show_result_table(){ + jQuery('#loading-message').attr("style", "display: none"); + jQuery('#module-result').attr("style", "display: inline"); +} \ No newline at end of file diff --git a/plugins/mezuro/views/content_viewer/_module_result.rhtml b/plugins/mezuro/views/content_viewer/_module_result.rhtml index 4c09f54..da8ba4e 100644 --- a/plugins/mezuro/views/content_viewer/_module_result.rhtml +++ b/plugins/mezuro/views/content_viewer/_module_result.rhtml @@ -18,5 +18,4 @@ <% end %> - - + \ No newline at end of file diff --git a/plugins/mezuro/views/content_viewer/show_project.rhtml b/plugins/mezuro/views/content_viewer/show_project.rhtml index eeb076d..b80f86a 100644 --- a/plugins/mezuro/views/content_viewer/show_project.rhtml +++ b/plugins/mezuro/views/content_viewer/show_project.rhtml @@ -71,6 +71,9 @@