Commit 9ea160c6a747241c2ee7a843319e69ebbb734c2e

Authored by Rafael Manzo
Committed by Rafael Reggiani Manzo
1 parent 43b3c98a

[Colab] Fixes processing state query for subdirectory on routes

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