2016-08-17 17:41:24 -04:00
|
|
|
(function() {
|
|
|
|
function toggleGraph() {
|
|
|
|
const $pipelineBtn = $(this).closest('.toggle-pipeline-btn');
|
|
|
|
const $pipelineGraph = $(this).closest('.row-content-block').next('.pipeline-graph');
|
|
|
|
const $btnText = $(this).find('.toggle-btn-text');
|
2016-08-16 20:42:05 -04:00
|
|
|
|
2016-08-17 17:41:24 -04:00
|
|
|
$($pipelineBtn).add($pipelineGraph).toggleClass('graph-collapsed');
|
2016-08-17 11:06:10 -04:00
|
|
|
|
2016-08-17 17:41:24 -04:00
|
|
|
const graphCollapsed = $pipelineGraph.hasClass('graph-collapsed');
|
2016-08-16 20:42:05 -04:00
|
|
|
|
2016-08-17 17:41:24 -04:00
|
|
|
graphCollapsed ? $btnText.text('Expand') : $btnText.text('Hide')
|
|
|
|
}
|
2016-08-16 20:42:05 -04:00
|
|
|
|
2016-08-17 17:41:24 -04:00
|
|
|
$(document).on('click', '.toggle-pipeline-btn', toggleGraph);
|
|
|
|
})();
|