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
0a634f34
Commit
0a634f34
authored
Mar 29, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9040 from tsigo/rs-refactor-nav-collapse
Refactor sidebar JS logic
parents
9742c514
65c4dc19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
app/assets/javascripts/sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+3
-8
No files found.
app/assets/javascripts/sidebar.js.coffee
View file @
0a634f34
...
...
@@ -3,12 +3,7 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
collapsed
=
'page-sidebar-collapsed'
expanded
=
'page-sidebar-expanded'
if
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
)
$
(
'.page-with-sidebar'
).
removeClass
(
collapsed
).
addClass
(
expanded
)
$
(
'.toggle-nav-collapse i'
).
removeClass
(
'fa-angle-right'
).
addClass
(
'fa-angle-left'
)
$
.
cookie
(
"collapsed_nav"
,
"false"
,
{
path
:
'/'
})
else
$
(
'.page-with-sidebar'
).
removeClass
(
expanded
).
addClass
(
collapsed
)
$
(
'.toggle-nav-collapse i'
).
removeClass
(
'fa-angle-left'
).
addClass
(
'fa-angle-right'
)
$
.
cookie
(
"collapsed_nav"
,
"true"
,
{
path
:
'/'
})
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
expanded
}
"
)
$
(
'.toggle-nav-collapse i'
).
toggleClass
(
"fa-angle-right fa-angle-left"
)
$
.
cookie
(
"collapsed_nav"
,
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
),
{
path
:
'/'
})
)
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