Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-09 18:05:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-09 18:05:58 +0300
commitcc6b394a063eb77c90505e4adca2e2da2e29c3a2 (patch)
tree94ec203489b9c800b832c7bd4f1b7aadc5a96958 /app/assets/javascripts/jobs
parent0a850868dfb85086cba8320cee9dac4657dcae6c (diff)
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.vue52
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>