Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5dfe3d73
Commit
5dfe3d73
authored
Apr 23, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3668 from Deradon/fix-blob-switching
Fix issue when switching branch when BLOB is shown
parents
5ac5f586
93dd06fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1 deletion
+5
-1
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+2
-0
app/views/blob/show.html.haml
app/views/blob/show.html.haml
+1
-1
app/views/blob/show.js.haml
app/views/blob/show.js.haml
+1
-0
app/views/tree/show.js.haml
app/views/tree/show.js.haml
+1
-0
No files found.
app/controllers/refs_controller.rb
View file @
5dfe3d73
...
...
@@ -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
...
...
app/views/blob/show.html.haml
View file @
5dfe3d73
%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
app/views/blob/show.js.haml
View file @
5dfe3d73
...
...
@@ -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() {
...
...
app/views/tree/show.js.haml
View file @
5dfe3d73
...
...
@@ -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() {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment