diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-11-18 15:48:28 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-18 15:48:28 +0300 |
commit | 0ed8c4597834dfd0c2d5d2383c8d9afedb90799c (patch) | |
tree | f3b0f94ffebb22ebbf4ceb2dab984cca2d695fc9 /app/assets/javascripts | |
parent | 688ff26df3f288e5cd50096a01014188a5e4011b (diff) | |
parent | abe35457ee6ef7e13cf9f67a8bd0b9bbc380dfe7 (diff) |
Merge branch 'pipelines-page-redesign' into 'master'
Pipelines page redesign
Closes #23637
![Screen_Shot_2016-11-15_at_1.36.34_PM](/uploads/edc6a58f00cca3e03ffd1689bd6eebd8/Screen_Shot_2016-11-15_at_1.36.34_PM.png)
See merge request !7487
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/pipelines.js.es6 | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/app/assets/javascripts/pipelines.js.es6 b/app/assets/javascripts/pipelines.js.es6 index e6fada5c84c..a84db9c0233 100644 --- a/app/assets/javascripts/pipelines.js.es6 +++ b/app/assets/javascripts/pipelines.js.es6 @@ -3,26 +3,12 @@ class Pipelines { constructor() { - this.initGraphToggle(); this.addMarginToBuildColumns(); } - initGraphToggle() { - this.pipelineGraph = document.querySelector('.pipeline-graph'); - this.toggleButton = document.querySelector('.toggle-pipeline-btn'); - this.toggleButtonText = this.toggleButton.querySelector('.toggle-btn-text'); - this.toggleButton.addEventListener('click', this.toggleGraph.bind(this)); - } - - toggleGraph() { - const graphCollapsed = this.pipelineGraph.classList.contains('graph-collapsed'); - this.toggleButton.classList.toggle('graph-collapsed'); - this.pipelineGraph.classList.toggle('graph-collapsed'); - this.toggleButtonText.textContent = graphCollapsed ? 'Hide' : 'Expand'; - } - addMarginToBuildColumns() { - const secondChildBuildNodes = this.pipelineGraph.querySelectorAll('.build:nth-child(2)'); + this.pipelineGraph = document.querySelector('.pipeline-graph'); + const secondChildBuildNodes = document.querySelector('.pipeline-graph').querySelectorAll('.build:nth-child(2)'); for (buildNodeIndex in secondChildBuildNodes) { const buildNode = secondChildBuildNodes[buildNodeIndex]; const firstChildBuildNode = buildNode.previousElementSibling; |