From a8f67508975e1f96efd5bd4b120b2d12cce62c98 Mon Sep 17 00:00:00 2001 From: Diego Araújo + João M. M. da Silva + João Machini Date: Thu, 10 May 2012 15:11:10 -0300 Subject: [PATCH] [Mezuro] Displaying message when loading project. --- plugins/mezuro/public/javascripts/project_content.js | 20 +++++++++++--------- plugins/mezuro/views/content_viewer/show_project.rhtml | 9 +++++++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/plugins/mezuro/public/javascripts/project_content.js b/plugins/mezuro/public/javascripts/project_content.js index 6c87ac3..e4cce62 100644 --- a/plugins/mezuro/public/javascripts/project_content.js +++ b/plugins/mezuro/public/javascripts/project_content.js @@ -59,22 +59,24 @@ function reloadProject(date){ } function showProjectContentFor(state){ - alert(state); - if (state == 'ERROR') + if (state == 'ERROR') { + jQuery('#project-state').html('ERROR'); callAction('project_error', {}, showProjectResult); + } else if (state == 'READY') { - jQuery('.msg-time').hide(); + jQuery('#msg-time').html(''); + jQuery('#project-state').html('READY'); callAction('project_result', {}, showProjectResult); callAction('project_tree', {}, showProjectTree); var project_name = jQuery("#project-result").attr('data-project-name'); callAction('module_result', {module_name: project_name}, showModuleResult); } - else if (state.endsWith("ING")) - jQuery('.msg-time').show(); - jQuery('.msg-time').replaceWith('O carregamento do projeto pode levar algumas horas!'); - - showProjectContentAfter(20); - } + else if (state.endsWith("ING")) { + jQuery('#project-state').html(state); + jQuery('#msg-time').html("The project analysis may take long.
You'll receive an e-mail when it's ready!"); + showProjectContentAfter(20); + } +} function showProjectContentAfter(seconds){ if (seconds > 0){ diff --git a/plugins/mezuro/views/content_viewer/show_project.rhtml b/plugins/mezuro/views/content_viewer/show_project.rhtml index 8138f4d..1e83de7 100644 --- a/plugins/mezuro/views/content_viewer/show_project.rhtml +++ b/plugins/mezuro/views/content_viewer/show_project.rhtml @@ -26,11 +26,16 @@ <%= _('Configuration') %> <%= @project.configuration_name %> + + <%= _('Status')%> + +
<%= @project.state %>
+
+ +
-
-
-- libgit2 0.21.2