diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-30 12:31:41 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-30 12:37:35 +0100 |
commit | 531a4d124b0a17280b4118d7fa7c66f11042917b (patch) | |
tree | a2ee668d403ed538d6046f942f31bce2c1224563 /app/assets/javascripts/build.js | |
parent | f5681fb55a762c9b9bb35c80bf87d727d8d8fd06 (diff) | |
parent | 81dba76b9d7d120cd22e3619a4058bd4885be9bc (diff) | |
download | gitlab-ce-experimental-breadcrumbs.tar.gz |
Merge branch 'master' into experimental-breadcrumbsexperimental-breadcrumbs
Diffstat (limited to 'app/assets/javascripts/build.js')
-rw-r--r-- | app/assets/javascripts/build.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index c28f6e151a0..60103155ce0 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -85,9 +85,8 @@ window.Build = (function () { if (!this.hasBeenScrolled) { this.scrollToBottom(); } - }); - - this.verifyTopPosition(); + }) + .then(() => this.verifyTopPosition()); } Build.prototype.canScroll = function () { @@ -176,7 +175,7 @@ window.Build = (function () { } if ($flashError.length) { - topPostion += $flashError.outerHeight(); + topPostion += $flashError.outerHeight() + prependTopDefault; } this.$buildTrace.css({ @@ -196,6 +195,7 @@ window.Build = (function () { }) .done((log) => { gl.utils.setCiStatusFavicon(`${this.pageUrl}/status.json`); + if (log.state) { this.state = log.state; } @@ -220,7 +220,11 @@ window.Build = (function () { } if (!log.complete) { - this.toggleScrollAnimation(true); + if (!this.hasBeenScrolled) { + this.toggleScrollAnimation(true); + } else { + this.toggleScrollAnimation(false); + } Build.timeout = setTimeout(() => { //eslint-disable-next-line @@ -229,7 +233,8 @@ window.Build = (function () { if (!this.hasBeenScrolled) { this.scrollToBottom(); } - }); + }) + .then(() => this.verifyTopPosition()); }, 4000); } else { this.$buildRefreshAnimation.remove(); |