Commit 93dd06fc2d81869a95dc24df004027ba489b3ec0
1 parent
5ac5f586
Exists in
master
and in
4 other branches
Fix issue when switching branch when BLOB is shown
Fix blob-switching for AJAX-Requests Reorder
Showing
4 changed files
with
5 additions
and
1 deletions
Show diff stats
app/controllers/refs_controller.rb
... | ... | @@ -13,6 +13,8 @@ class RefsController < ProjectResourceController |
13 | 13 | format.html do |
14 | 14 | new_path = if params[:destination] == "tree" |
15 | 15 | project_tree_path(@project, (@ref + "/" + params[:path])) |
16 | + elsif params[:destination] == "blob" | |
17 | + project_blob_path(@project, (@ref + "/" + params[:path])) | |
16 | 18 | elsif params[:destination] == "graph" |
17 | 19 | project_graph_path(@project, @ref) |
18 | 20 | else | ... | ... |
app/views/blob/show.html.haml
app/views/blob/show.js.haml
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | $("#tree-holder").html("#{escape_javascript(render(partial: "blob", locals: {blob: @blob}))}"); |
4 | 4 | $("#tree-content-holder").show("slide", { direction: "right" }, 400); |
5 | 5 | $('.project-refs-form #path').val("#{@path}"); |
6 | + $(".project-refs-form #destination").val("blob"); | |
6 | 7 | |
7 | 8 | // Load last commit log for each file in tree |
8 | 9 | $('#tree-slider').waitForImages(function() { | ... | ... |
app/views/tree/show.js.haml
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | $("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {tree: @tree}))}"); |
4 | 4 | $("#tree-content-holder").show("slide", { direction: "right" }, 400); |
5 | 5 | $('.project-refs-form #path').val("#{@path}"); |
6 | + $(".project-refs-form #destination").val("tree"); | |
6 | 7 | |
7 | 8 | // Load last commit log for each file in tree |
8 | 9 | $('#tree-slider').waitForImages(function() { | ... | ... |