mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 22:59:19 +10:00
Fix issue when switching branch when BLOB is shown
Fix blob-switching for AJAX-Requests Reorder
This commit is contained in:
@@ -13,6 +13,8 @@ class RefsController < ProjectResourceController
|
||||
format.html do
|
||||
new_path = if params[:destination] == "tree"
|
||||
project_tree_path(@project, (@ref + "/" + params[:path]))
|
||||
elsif params[:destination] == "blob"
|
||||
project_blob_path(@project, (@ref + "/" + params[:path]))
|
||||
elsif params[:destination] == "graph"
|
||||
project_graph_path(@project, @ref)
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%div.tree-ref-holder
|
||||
= render 'shared/ref_switcher', destination: 'tree', path: @path
|
||||
= render 'shared/ref_switcher', destination: 'blob', path: @path
|
||||
%div#tree-holder.tree-holder
|
||||
= render 'blob', blob: @blob
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$("#tree-holder").html("#{escape_javascript(render(partial: "blob", locals: {blob: @blob}))}");
|
||||
$("#tree-content-holder").show("slide", { direction: "right" }, 400);
|
||||
$('.project-refs-form #path').val("#{@path}");
|
||||
$(".project-refs-form #destination").val("blob");
|
||||
|
||||
// Load last commit log for each file in tree
|
||||
$('#tree-slider').waitForImages(function() {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {tree: @tree}))}");
|
||||
$("#tree-content-holder").show("slide", { direction: "right" }, 400);
|
||||
$('.project-refs-form #path').val("#{@path}");
|
||||
$(".project-refs-form #destination").val("tree");
|
||||
|
||||
// Load last commit log for each file in tree
|
||||
$('#tree-slider').waitForImages(function() {
|
||||
|
||||
Reference in New Issue
Block a user