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
Boxiang Sun
gitlab-ce
Commits
625b0bcf
Commit
625b0bcf
authored
Aug 07, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove JS flicker on page load; UI tweaks
parent
b12107a0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
app/assets/javascripts/new_sidebar.js
app/assets/javascripts/new_sidebar.js
+4
-2
app/assets/stylesheets/new_sidebar.scss
app/assets/stylesheets/new_sidebar.scss
+1
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+1
-0
app/views/layouts/nav/_new_project_sidebar.html.haml
app/views/layouts/nav/_new_project_sidebar.html.haml
+2
-2
No files found.
app/assets/javascripts/new_sidebar.js
View file @
625b0bcf
...
...
@@ -45,8 +45,10 @@ export default class NewNavSidebar {
toggleCollapsedSidebar
(
collapsed
)
{
this
.
$sidebar
.
toggleClass
(
'
sidebar-icons-only
'
,
collapsed
);
if
(
this
.
$sidebar
.
length
)
{
this
.
$page
.
toggleClass
(
'
page-with-new-sidebar
'
,
!
collapsed
);
this
.
$page
.
toggleClass
(
'
page-with-icon-sidebar
'
,
collapsed
);
}
NewNavSidebar
.
setCollapsedCookie
(
collapsed
);
}
...
...
app/assets/stylesheets/new_sidebar.scss
View file @
625b0bcf
...
...
@@ -400,6 +400,7 @@ $new-sidebar-collapsed-width: 50px;
.toggle-sidebar-button
{
width
:
$new-sidebar-collapsed-width
-
2px
;
padding
:
16px
18px
;
.collapse-text
,
.fa-angle-double-left
{
...
...
app/helpers/application_helper.rb
View file @
625b0bcf
...
...
@@ -305,4 +305,8 @@ module ApplicationHelper
def
show_new_nav?
cookies
[
"new_nav"
]
==
"true"
end
def
collapsed_sidebar?
cookies
[
"sidebar_collapsed"
]
==
"true"
end
end
app/helpers/nav_helper.rb
View file @
625b0bcf
...
...
@@ -2,6 +2,7 @@ module NavHelper
def
page_with_sidebar_class
class_name
=
page_gutter_class
class_name
<<
'page-with-new-sidebar'
if
defined?
(
@new_sidebar
)
&&
@new_sidebar
class_name
<<
'page-with-icon-sidebar'
if
collapsed_sidebar?
class_name
end
...
...
app/views/layouts/nav/_new_project_sidebar.html.haml
View file @
625b0bcf
.nav-sidebar
.nav-sidebar
{
class:
(
"sidebar-icons-only"
if
collapsed_sidebar?
)
}
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
.context-header
=
link_to
project_path
(
@project
),
title:
@project
.
name
do
...
...
@@ -219,7 +219,7 @@
=
link_to
project_settings_members_path
(
@project
),
title:
'Members'
,
class:
'shortcuts-tree'
do
.nav-icon-container
=
custom_icon
(
'members'
)
%span
%span
.nav-item-name
Members
=
render
'shared/sidebar_toggle_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