diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 15:05:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 15:05:58 +0000 |
commit | cc6b394a063eb77c90505e4adca2e2da2e29c3a2 (patch) | |
tree | 94ec203489b9c800b832c7bd4f1b7aadc5a96958 /app/assets/javascripts/jobs | |
parent | 0a850868dfb85086cba8320cee9dac4657dcae6c (diff) | |
download | gitlab-ce-cc6b394a063eb77c90505e4adca2e2da2e29c3a2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/jobs')
-rw-r--r-- | app/assets/javascripts/jobs/components/job_log.vue | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/app/assets/javascripts/jobs/components/job_log.vue b/app/assets/javascripts/jobs/components/job_log.vue index a3fbe9338ee..20888c0af42 100644 --- a/app/assets/javascripts/jobs/components/job_log.vue +++ b/app/assets/javascripts/jobs/components/job_log.vue @@ -19,18 +19,13 @@ export default { updated() { this.$nextTick(() => { this.handleScrollDown(); - this.handleCollapsibleRows(); }); }, mounted() { this.$nextTick(() => { this.handleScrollDown(); - this.handleCollapsibleRows(); }); }, - destroyed() { - this.removeEventListener(); - }, methods: { ...mapActions(['scrollBottom']), /** @@ -47,53 +42,6 @@ export default { }, 0); } }, - removeEventListener() { - this.$el.querySelectorAll('.js-section-start').forEach(el => { - const titleSection = el.nextSibling; - titleSection.removeEventListener( - 'click', - this.handleHeaderClick.bind(this, el, el.dataset.section), - ); - el.removeEventListener('click', this.handleSectionClick); - }); - }, - /** - * The collapsible rows are sent in HTML from the backend - * We need tos add a onclick handler for the divs that match `.js-section-start` - * - */ - handleCollapsibleRows() { - this.$el.querySelectorAll('.js-section-start').forEach(el => { - const titleSection = el.nextSibling; - titleSection.addEventListener( - 'click', - this.handleHeaderClick.bind(this, el, el.dataset.section), - ); - el.addEventListener('click', this.handleSectionClick); - }); - }, - - handleHeaderClick(arrowElement, section) { - this.updateToggleSection(arrowElement, section); - }, - - updateToggleSection(arrow, section) { - // toggle the arrow class - arrow.classList.toggle('fa-caret-right'); - arrow.classList.toggle('fa-caret-down'); - - // hide the sections - const sibilings = this.$el.querySelectorAll(`.js-s-${section}:not(.js-section-header)`); - sibilings.forEach(row => row.classList.toggle('hidden')); - }, - /** - * On click, we toggle the hidden class of - * all the rows that match the `data-section` selector - */ - handleSectionClick(evt) { - const clickedArrow = evt.currentTarget; - this.updateToggleSection(clickedArrow, clickedArrow.dataset.section); - }, }, }; </script> |