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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ad0b8187
Commit
ad0b8187
authored
Dec 09, 2016
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect scroll button appearance in certain cases
parent
6fe5bb40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+12
-1
No files found.
app/assets/javascripts/build.js
View file @
ad0b8187
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
};
};
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
var
_this
=
this
;
var
removeRefreshStatuses
=
[
'
success
'
,
'
failed
'
,
'
canceled
'
,
'
skipped
'
]
var
removeRefreshStatuses
=
[
'
success
'
,
'
failed
'
,
'
canceled
'
,
'
skipped
'
]
return
$
.
ajax
({
return
$
.
ajax
({
...
@@ -89,6 +90,7 @@
...
@@ -89,6 +90,7 @@
success
:
function
(
buildData
)
{
success
:
function
(
buildData
)
{
$
(
'
.js-build-output
'
).
html
(
buildData
.
trace_html
);
$
(
'
.js-build-output
'
).
html
(
buildData
.
trace_html
);
if
(
removeRefreshStatuses
.
indexOf
(
buildData
.
status
)
>=
0
)
{
if
(
removeRefreshStatuses
.
indexOf
(
buildData
.
status
)
>=
0
)
{
_this
.
initScrollMonitor
();
return
$
(
'
.js-build-refresh
'
).
remove
();
return
$
(
'
.js-build-refresh
'
).
remove
();
}
}
}
}
...
@@ -123,11 +125,20 @@
...
@@ -123,11 +125,20 @@
if
(
$
(
"
#autoscroll-status
"
).
data
(
"
state
"
)
===
"
enabled
"
)
{
if
(
$
(
"
#autoscroll-status
"
).
data
(
"
state
"
)
===
"
enabled
"
)
{
return
$
(
"
html,body
"
).
scrollTop
(
$
(
"
#build-trace
"
).
height
());
return
$
(
"
html,body
"
).
scrollTop
(
$
(
"
#build-trace
"
).
height
());
}
}
// Handle a situation where user started new build
// but never scrolled a page
if
(
!
this
.
$scrollTopBtn
.
is
(
'
:visible
'
)
&&
!
this
.
$scrollBottomBtn
.
is
(
'
:visible
'
)
&&
!
gl
.
utils
.
isInViewport
(
this
.
$downBuildTrace
[
0
]))
{
this
.
$scrollBottomBtn
.
show
();
}
};
};
Build
.
prototype
.
initScrollButtonAffix
=
function
()
{
Build
.
prototype
.
initScrollButtonAffix
=
function
()
{
// Hide everything initially
this
.
$scrollTopBtn
.
hide
();
this
.
$scrollTopBtn
.
hide
();
this
.
$scrollBottomBtn
.
show
();
this
.
$scrollBottomBtn
.
hide
();
this
.
$autoScrollContainer
.
hide
();
this
.
$autoScrollContainer
.
hide
();
}
}
...
...
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