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
Jérome Perrin
gitlab-ce
Commits
7203826b
Commit
7203826b
authored
Feb 16, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache js selectors; fix css
parent
7308e2b9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+9
-5
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+6
-6
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+1
-1
No files found.
app/assets/javascripts/right_sidebar.js
View file @
7203826b
...
...
@@ -21,13 +21,16 @@
};
Sidebar
.
prototype
.
addEventListeners
=
function
()
{
const
$document
=
$
(
document
);
const
throttledSetSidebarHeight
=
_
.
throttle
(
this
.
setSidebarHeight
,
10
);
this
.
sidebar
.
on
(
'
click
'
,
'
.sidebar-collapsed-icon
'
,
this
,
this
.
sidebarCollapseClicked
);
$
(
'
.dropdown
'
).
on
(
'
hidden.gl.dropdown
'
,
this
,
this
.
onSidebarDropdownHidden
);
$
(
'
.dropdown
'
).
on
(
'
loading.gl.dropdown
'
,
this
.
sidebarDropdownLoading
);
$
(
'
.dropdown
'
).
on
(
'
loaded.gl.dropdown
'
,
this
.
sidebarDropdownLoaded
);
$
(
window
).
on
(
'
resize
'
,
()
=>
th
is
.
s
etSidebarHeight
());
$
(
document
).
on
(
'
scroll
'
,
()
=>
this
.
s
etSidebarHeight
());
$
(
document
)
.
on
(
'
click
'
,
'
.js-sidebar-toggle
'
,
function
(
e
,
triggered
)
{
$
(
window
).
on
(
'
resize
'
,
()
=>
th
rottledS
etSidebarHeight
());
$
document
.
on
(
'
scroll
'
,
()
=>
throttledS
etSidebarHeight
());
$
document
.
on
(
'
click
'
,
'
.js-sidebar-toggle
'
,
function
(
e
,
triggered
)
{
var
$allGutterToggleIcons
,
$this
,
$thisIcon
;
e
.
preventDefault
();
$this
=
$
(
this
);
...
...
@@ -195,11 +198,12 @@
Sidebar
.
prototype
.
setSidebarHeight
=
function
()
{
const
$navHeight
=
$
(
'
.navbar-gitlab
'
).
outerHeight
()
+
$
(
'
.layout-nav
'
).
outerHeight
();
const
$rightSidebar
=
$
(
'
.js-right-sidebar
'
);
const
diff
=
$navHeight
-
$
(
'
body
'
).
scrollTop
();
if
(
diff
>
0
)
{
$
(
'
.js-right-sidebar
'
)
.
outerHeight
(
$
(
window
).
height
()
-
diff
);
$
rightSidebar
.
outerHeight
(
$
(
window
).
height
()
-
diff
);
}
else
{
$
(
'
.js-right-sidebar
'
)
.
outerHeight
(
'
100%
'
);
$
rightSidebar
.
outerHeight
(
'
100%
'
);
}
};
...
...
app/assets/stylesheets/framework/header.scss
View file @
7203826b
...
...
@@ -110,18 +110,18 @@ header {
font-size
:
11px
;
}
li
.active
{
a
{
li
{
.active
a
{
font-weight
:
bold
;
}
}
li
:hover
{
&
:hover
{
.badge
{
background-color
:
$white-light
;
}
}
}
}
.global-dropdown-toggle
{
margin
:
7px
0
;
...
...
app/views/layouts/_page.html.haml
View file @
7203826b
.page-with-sidebar
{
class:
"#{page_gutter_class}"
}
.page-with-sidebar
{
class:
page_gutter_class
}
-
if
defined?
(
nav
)
&&
nav
.layout-nav
.container-fluid
...
...
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