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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
4860c4dc
Commit
4860c4dc
authored
Apr 22, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix toggle of sidebar
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1e7c4a25
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
16 deletions
+43
-16
app/assets/javascripts/sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+1
-0
app/assets/stylesheets/generic/header.scss
app/assets/stylesheets/generic/header.scss
+23
-6
app/assets/stylesheets/generic/sidebar.scss
app/assets/stylesheets/generic/sidebar.scss
+0
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+0
-8
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+16
-0
app/views/layouts/_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+1
-1
app/views/layouts/_public_head_panel.html.haml
app/views/layouts/_public_head_panel.html.haml
+2
-1
No files found.
app/assets/javascripts/sidebar.js.coffee
View file @
4860c4dc
...
...
@@ -4,6 +4,7 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
expanded
=
'page-sidebar-expanded'
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
expanded
}
"
)
$
(
'header'
).
toggleClass
(
"header-collapsed header-expanded"
)
$
(
'.toggle-nav-collapse i'
).
toggleClass
(
"fa-angle-right fa-angle-left"
)
$
.
cookie
(
"collapsed_nav"
,
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
),
{
path
:
'/'
})
)
app/assets/stylesheets/generic/header.scss
View file @
4860c4dc
...
...
@@ -36,12 +36,6 @@ header {
}
.app_logo
{
@media
(
max-width
:
$screen-md-max
)
{
width
:
52px
;
h3
{
display
:
none
;
}
}
border-bottom
:
1px
solid
transparent
;
margin-bottom
:
-1px
;
...
...
@@ -229,3 +223,26 @@ header {
right
:
35px
!
important
;
}
}
@media
(
max-width
:
$screen-md-max
)
{
.header-collapsed
,
.header-expanded
{
width
:
52px
;
h3
{
display
:
none
;
}
}
}
@media
(
min-width
:
$screen-md-max
)
{
.header-collapsed
{
width
:
52px
;
h3
{
display
:
none
;
}
}
.header-expanded
{
}
}
app/assets/stylesheets/generic/
nav_
sidebar.scss
→
app/assets/stylesheets/generic/sidebar.scss
View file @
4860c4dc
File moved
app/helpers/application_helper.rb
View file @
4860c4dc
...
...
@@ -314,12 +314,4 @@ module ApplicationHelper
profile_key_path
(
key
)
end
end
def
nav_sidebar_class
if
nav_menu_collapsed?
"page-sidebar-collapsed"
else
"page-sidebar-expanded"
end
end
end
app/helpers/nav_helper.rb
View file @
4860c4dc
...
...
@@ -2,4 +2,20 @@ module NavHelper
def
nav_menu_collapsed?
cookies
[
:collapsed_nav
]
==
'true'
end
def
nav_sidebar_class
if
nav_menu_collapsed?
"page-sidebar-collapsed"
else
"page-sidebar-expanded"
end
end
def
nav_header_class
if
nav_menu_collapsed?
"header-collapsed"
else
"header-expanded"
end
end
end
app/views/layouts/_head_panel.html.haml
View file @
4860c4dc
%header
.navbar.navbar-fixed-top.navbar-gitlab
%header
.navbar.navbar-fixed-top.navbar-gitlab
{
class:
nav_header_class
}
.navbar-inner
.container
%div
.app_logo
...
...
app/views/layouts/_public_head_panel.html.haml
View file @
4860c4dc
%header
.navbar.navbar-fixed-top.navbar-gitlab
%header
.navbar.navbar-fixed-top.navbar-gitlab
{
class:
nav_header_class
}
.navbar-inner
.container
%div
.app_logo
=
link_to
explore_root_path
,
class:
"home"
do
=
brand_header_logo
%h3
GitLab
%h1
.title
=
title
%button
.navbar-toggle
{
"data-target"
=>
".navbar-collapse"
,
"data-toggle"
=>
"collapse"
,
type:
"button"
}
...
...
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