[Search] 'All' selected upon no filters. Fixes #1117

Upon deselecting every filter, the search returns nothing. This serves 
no useful purpose as discussed in #1117. Now deselecting every filter 
automatically selects 'All'.
This commit is contained in:
Kevin Van Kessel 2016-08-22 12:52:34 -07:00 committed by GitHub
parent eb3b6e5eca
commit e29efbbcdf

View File

@ -80,7 +80,7 @@ define(function () {
// If there's still nothing in the filters string, there are no
// filters selected
if ($scope.ngModel.filtersString === '') {
$scope.ngModel.filtersString = 'NONE';
$scope.ngModel.checkAll = true;
}
}
@ -95,12 +95,11 @@ define(function () {
$scope.ngModel.checked[type] = false;
});
// Change the filters string depending on checkAll status
if ($scope.ngModel.checkAll) {
// This setting will make the filters display hidden
$scope.ngModel.filtersString = '';
} else {
$scope.ngModel.filtersString = 'NONE';
// This setting will make the filters display hidden
$scope.ngModel.filtersString = '';
// Do not let checkAll become unchecked when it is the only checked filter
if (!$scope.ngModel.checkAll) {
$scope.ngModel.checkAll = true;
}
// Re-filter results