Merge pull request #4394 from jaredevantabor/workflow-results-labels

making labels collapsible on workflow-results
This commit is contained in:
Jared Tabor 2016-12-12 14:41:31 -08:00 committed by GitHub
commit d81bd9647e
2 changed files with 35 additions and 5 deletions

View File

@ -121,6 +121,18 @@ export default ['workflowData',
$scope.showManualControls = !$scope.showManualControls;
};
$scope.lessLabels = false;
$scope.toggleLessLabels = function() {
if (!$scope.lessLabels) {
$('#workflow-results-labels').slideUp(200);
$scope.lessLabels = true;
}
else {
$('#workflow-results-labels').slideDown(200);
$scope.lessLabels = false;
}
};
$scope.panChart = function(direction) {
$scope.$broadcast('panWorkflowChart', {
direction: direction

View File

@ -147,11 +147,27 @@
<!-- LABELS DETAIL -->
<div class="WorkflowResults-resultRow"
ng-show="labels && labels.length > 0">
<label class="WorkflowResults-resultRowLabel
WorkflowResults-resultRowLabel--fullWidth">
Labels
</label>
<div class="LabelList
<div class="WorkflowResults-resultRow">
<a class="WorkflowResults-resultRowLabel
WorkflowResults-resultRowLabel--fullWidth"
ng-show="lessLabels"
href=""
ng-click="toggleLessLabels()">
Labels
<i class="WorkflowResults-expandArrow
fa fa-caret-right"></i>
</a>
<a class="WorkflowResults-resultRowLabel
WorkflowResults-resultRowLabel--fullWidth"
ng-show="!lessLabels"
href=""
ng-click="toggleLessLabels()">
Labels
<i class="WorkflowResults-expandArrow
fa fa-caret-down"></i>
</a>
</div>
<div id="workflow-results-labels" class="LabelList
WorkflowResults-resultRowText
WorkflowResults-resultRowText--fullWidth">
<div ng-repeat="label in labels"
@ -164,6 +180,8 @@
</div>
</div>
</div>
<!-- end of labels-->
</div>
</div>