[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:
@@ -80,7 +80,7 @@ define(function () {
|
|||||||
// If there's still nothing in the filters string, there are no
|
// If there's still nothing in the filters string, there are no
|
||||||
// filters selected
|
// filters selected
|
||||||
if ($scope.ngModel.filtersString === '') {
|
if ($scope.ngModel.filtersString === '') {
|
||||||
$scope.ngModel.filtersString = 'NONE';
|
$scope.ngModel.checkAll = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,12 +95,11 @@ define(function () {
|
|||||||
$scope.ngModel.checked[type] = false;
|
$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
|
// This setting will make the filters display hidden
|
||||||
$scope.ngModel.filtersString = '';
|
$scope.ngModel.filtersString = '';
|
||||||
} else {
|
// Do not let checkAll become unchecked when it is the only checked filter
|
||||||
$scope.ngModel.filtersString = 'NONE';
|
if (!$scope.ngModel.checkAll) {
|
||||||
|
$scope.ngModel.checkAll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-filter results
|
// Re-filter results
|
||||||
|
|||||||
Reference in New Issue
Block a user