summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 03:06:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 03:06:19 +0000
commit91f027ede40879af0bce406f2872e8d35c01e334 (patch)
treea3e6b49e140694c95a7a30370c662c3bdd224227 /app
parentbd8a202da68db8c61150d52e246997f04c329110 (diff)
downloadgitlab-ce-91f027ede40879af0bce406f2872e8d35c01e334.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/lib/utils/logoutput_behaviours.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/app/assets/javascripts/lib/utils/logoutput_behaviours.js b/app/assets/javascripts/lib/utils/logoutput_behaviours.js
deleted file mode 100644
index 41b57025cc9..00000000000
--- a/app/assets/javascripts/lib/utils/logoutput_behaviours.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import $ from 'jquery';
-import {
- canScroll,
- isScrolledToBottom,
- isScrolledToTop,
- isScrolledToMiddle,
- toggleDisableButton,
-} from './scroll_utils';
-
-export default class LogOutputBehaviours {
- constructor() {
- // Scroll buttons
- this.$scrollTopBtn = $('.js-scroll-up');
- this.$scrollBottomBtn = $('.js-scroll-down');
-
- this.$scrollTopBtn.off('click').on('click', this.scrollToTop.bind(this));
- this.$scrollBottomBtn.off('click').on('click', this.scrollToBottom.bind(this));
- }
-
- toggleScroll() {
- if (canScroll()) {
- if (isScrolledToMiddle()) {
- // User is in the middle of the log
-
- toggleDisableButton(this.$scrollTopBtn, false);
- toggleDisableButton(this.$scrollBottomBtn, false);
- } else if (isScrolledToTop()) {
- // User is at Top of Log
-
- toggleDisableButton(this.$scrollTopBtn, true);
- toggleDisableButton(this.$scrollBottomBtn, false);
- } else if (isScrolledToBottom()) {
- // User is at the bottom of the build log.
-
- toggleDisableButton(this.$scrollTopBtn, false);
- toggleDisableButton(this.$scrollBottomBtn, true);
- }
- } else {
- toggleDisableButton(this.$scrollTopBtn, true);
- toggleDisableButton(this.$scrollBottomBtn, true);
- }
- }
-
- toggleScrollAnimation(toggle) {
- this.$scrollBottomBtn.toggleClass('animate', toggle);
- }
-}