Commit 5c8841e70f1a409c17f9a63f25a75aefe3568ed2
1 parent
fc51ddb0
Exists in
colab
and in
4 other branches
Fixes Processing state retrieval when there is a locale
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
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 %>') | ... | ... |