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
a11e798a
Commit
a11e798a
authored
Jan 04, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep sidebars absolute until fixed at top; remove unneeded JS
parent
eefbc2bf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
17 deletions
+21
-17
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+3
-9
app/assets/javascripts/merge_request_tabs.js.es6
app/assets/javascripts/merge_request_tabs.js.es6
+1
-1
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+8
-2
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+5
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+2
-1
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-1
app/assets/stylesheets/pages/tree.scss
app/assets/stylesheets/pages/tree.scss
+0
-2
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
No files found.
app/assets/javascripts/build.js
View file @
a11e798a
...
...
@@ -67,6 +67,7 @@
Build
.
prototype
.
initSidebar
=
function
()
{
this
.
$sidebar
=
$
(
'
.js-build-sidebar
'
);
<<<<<<<
36
beffc12461d2e479ad8b000b7ba5b6ea40cd33
this
.
sidebarTranslationLimits
=
{
<<<<<<<
3
ee255139ab555ec49a177d3b2eed65580f36c4f
min
:
$
(
'
.navbar-gitlab
'
).
outerHeight
()
+
$
(
'
.layout-nav
'
).
outerHeight
()
...
...
@@ -80,9 +81,10 @@
this
.
$sidebar
.
css
({
top
:
this
.
sidebarTranslationLimits
.
max
});
=======
>>>>>>>
Keep
sidebars
absolute
until
fixed
at
top
;
remove
unneeded
JS
this
.
$sidebar
.
niceScroll
();
this
.
$document
.
off
(
'
click
'
,
'
.js-sidebar-build-toggle
'
).
on
(
'
click
'
,
'
.js-sidebar-build-toggle
'
,
this
.
toggleSidebar
);
this
.
$document
.
off
(
'
scroll.translateSidebar
'
).
on
(
'
scroll.translateSidebar
'
,
this
.
translateSidebar
.
bind
(
this
));
};
Build
.
prototype
.
location
=
function
()
{
...
...
@@ -237,14 +239,6 @@
return
bootstrapBreakpoint
===
'
xs
'
||
bootstrapBreakpoint
===
'
sm
'
;
};
Build
.
prototype
.
translateSidebar
=
function
(
e
)
{
var
newPosition
=
this
.
sidebarTranslationLimits
.
max
-
(
document
.
body
.
scrollTop
||
document
.
documentElement
.
scrollTop
);
if
(
newPosition
<
this
.
sidebarTranslationLimits
.
min
)
newPosition
=
this
.
sidebarTranslationLimits
.
min
;
this
.
$sidebar
.
css
({
top
:
newPosition
});
};
Build
.
prototype
.
toggleSidebar
=
function
(
shouldHide
)
{
var
shouldShow
=
typeof
shouldHide
===
'
boolean
'
?
!
shouldHide
:
undefined
;
this
.
$buildScroll
.
toggleClass
(
'
sidebar-expanded
'
,
shouldShow
)
...
...
app/assets/javascripts/merge_request_tabs.js.es6
View file @
a11e798a
...
...
@@ -337,7 +337,7 @@ require('./flash');
.affix({
offset: {
top: () => (
$diffTabs.offset().top - $tabs.height()
- $fixedNav.height() - $layoutNav.height()
$diffTabs.offset().top - $tabs.height()
),
},
})
...
...
app/assets/stylesheets/framework/nav.scss
View file @
a11e798a
...
...
@@ -416,14 +416,20 @@
}
.page-with-layout-nav
{
.right-sidebar
{
top
:
(
$header-height
*
2
)
+
2
;
}
.build-sidebar
{
top
:
(
$header-height
*
3
)
+
3
;
&
.affix
{
top
:
0
;
}
}
}
.activities
{
.nav-block
{
border-bottom
:
1px
solid
$border-color
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
a11e798a
...
...
@@ -256,4 +256,9 @@ header.header-sidebar-pinned {
.right-sidebar
{
border-left
:
1px
solid
$border-color
;
&
.affix
{
position
:
fixed
;
top
:
0
;
}
}
app/assets/stylesheets/pages/issuable.scss
View file @
a11e798a
...
...
@@ -189,7 +189,8 @@
}
.right-sidebar
{
position
:
fixed
;
position
:
absolute
;
height
:
100%
;
top
:
$header-height
;
bottom
:
0
;
right
:
0
;
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
a11e798a
...
...
@@ -479,7 +479,7 @@
background-color
:
$white-light
;
&
.affix
{
top
:
100px
;
top
:
0
;
left
:
0
;
z-index
:
10
;
transition
:
right
.15s
;
...
...
app/assets/stylesheets/pages/tree.scss
View file @
a11e798a
...
...
@@ -171,8 +171,6 @@
.tree-controls
{
float
:
right
;
margin-top
:
11px
;
position
:
relative
;
z-index
:
2
;
.project-action-button
{
margin-left
:
$btn-side-margin
;
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
a11e798a
-
builds
=
@build
.
pipeline
.
builds
.
to_a
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
{
data:
{
"offset-top"
=>
"151"
,
"spy"
=>
"affix"
}
}
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Job
%strong
##{@build.id}
...
...
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