Commit 5c8841e70f1a409c17f9a63f25a75aefe3568ed2

Authored by Rafael Manzo
1 parent fc51ddb0

Fixes Processing state retrieval when there is a locale

app/views/repositories/reload_processing.js.erb
  1 +current_path_splited = window.location.pathname.split("/");
  2 +if(current_path_splited[1] != "projects"){
  3 + current_path_splited.splice(1,1); // Removes the locale
  4 +}
  5 +current_path = current_path_splited.join("/");
  6 +
1 7 // This if prevents it from updating the repository's state after the user leaves its page
2   -if(document.URL == '<%= project_repository_url(@repository.project_id, @repository) %>'){
  8 +if(current_path == '<%= project_repository_path(project_id: @repository.project_id, id: @repository, locale: nil) %>'){
3 9 $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>');
4 10 repository = new Module.Repository(<%= @repository.project_id %>, <%= @repository.id %>)
5 11 repository.schedule_poll_state('<%= @processing.state %>')
... ...