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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
65c4dc19
Commit
65c4dc19
authored
Feb 03, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify toggle-nav-collapse JS
parent
3d4c2d0b
Changes
1
Hide 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 @
65c4dc19
...
@@ -3,12 +3,7 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
...
@@ -3,12 +3,7 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
collapsed
=
'page-sidebar-collapsed'
collapsed
=
'page-sidebar-collapsed'
expanded
=
'page-sidebar-expanded'
expanded
=
'page-sidebar-expanded'
if
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
)
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
expanded
}
"
)
$
(
'.page-with-sidebar'
).
removeClass
(
collapsed
).
addClass
(
expanded
)
$
(
'.toggle-nav-collapse i'
).
toggleClass
(
"fa-angle-right fa-angle-left"
)
$
(
'.toggle-nav-collapse i'
).
removeClass
(
'fa-angle-right'
).
addClass
(
'fa-angle-left'
)
$
.
cookie
(
"collapsed_nav"
,
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
),
{
path
:
'/'
})
$
.
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
:
'/'
})
)
)
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