BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9f0a71f4
Commit
9f0a71f4
authored
Feb 05, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shrink on diff view
Shrinks when navigating to diff view. Shrinks when refreshing on diff view. Expandable at anytime.
parent
28d42a33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
application.js.coffee
app/assets/javascripts/application.js.coffee
+10
-0
nav_helper.rb
app/helpers/nav_helper.rb
+16
-0
No files found.
app/assets/javascripts/application.js.coffee
View file @
9f0a71f4
...
...
@@ -226,6 +226,16 @@ $ ->
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$
(
document
)
.
off
'shown.bs.tab'
,
'.merge-request-tabs a[data-toggle="tab"]'
.
on
'shown.bs.tab'
,
'.merge-request-tabs a[data-toggle="tab"]'
,
(
e
)
->
action
=
$
(
e
.
target
).
attr
(
"data-action"
)
if
action
is
'diffs'
$gutterIcon
=
$
(
'.gutter-toggle'
).
find
(
'i'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$
(
document
)
.
off
'click'
,
'aside .gutter-toggle'
.
on
'click'
,
'aside .gutter-toggle'
,
(
e
)
->
e
.
preventDefault
()
...
...
app/helpers/nav_helper.rb
View file @
9f0a71f4
...
...
@@ -3,6 +3,20 @@ module NavHelper
cookies
[
:collapsed_nav
]
==
'true'
end
def
sidebar_gutter_collapsed_class
if
current_path?
(
'merge_requests#diffs'
)
||
cookies
[
:collapsed_gutter
]
==
'true'
"right-sidebar-collapsed"
else
"right-sidebar-expanded"
end
end
def
sidebar_gutter_collapsed?
current_path?
(
'merge_requests#diffs'
)
||
cookies
[
:collapsed_gutter
]
==
'true'
end
def
nav_sidebar_class
if
nav_menu_collapsed?
"sidebar-collapsed"
...
...
@@ -29,6 +43,8 @@ module NavHelper
else
"page-gutter right-sidebar-expanded"
end
elsif
current_path?
(
'merge_requests#diffs'
)
"page-gutter right-sidebar-collapsed"
end
end
...
...
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