Merge "Fix project group view checkboxes"
This commit is contained in:
commit
2ac6c341d5
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue