Merge "Fix project group view checkboxes"

This commit is contained in:
Zuul 2019-06-20 22:04:02 +00:00 committed by Gerrit Code Review
commit 2ac6c341d5
2 changed files with 10 additions and 9 deletions

View File

@ -92,22 +92,23 @@ angular.module('sb.project_group').controller('ProjectGroupDetailController',
/**
* Filter the stories.
*/
$scope.showActive = true;
$scope.showMerged = false;
$scope.showInvalid = false;
$scope.selectedStatus = {};
$scope.selectedStatus.showActive = true;
$scope.selectedStatus.showMerged = false;
$scope.selectedStatus.showInvalid = false;
/**
* Reload the stories in this view based on user selected filters.
*/
$scope.filterStories = function () {
var status = [];
if ($scope.showActive) {
if ($scope.selectedStatus.showActive) {
status.push('active');
}
if ($scope.showMerged) {
if ($scope.selectedStatus.showMerged) {
status.push('merged');
}
if ($scope.showInvalid) {
if ($scope.selectedStatus.showInvalid) {
status.push('invalid');
}

View File

@ -75,19 +75,19 @@
<br/>
<div class="checkbox label label-info">
<input type="checkbox"
ng-model="showActive"
ng-model="selectedStatus.showActive"
ng-change="filterStories()"/>
Active
</div>
<div class="checkbox label label-success">
<input type="checkbox"
ng-model="showMerged"
ng-model="selectedStatus.showMerged"
ng-change="filterStories()"/>
Merged
</div>
<div class="checkbox label label-default">
<input type="checkbox"
ng-model="showInvalid"
ng-model="selectedStatus.showInvalid"
ng-change="filterStories()"/>
Invalid
</div>