Fix sorting dialog for apparent filterFilter change

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2279/head
Alex Coles 10 years ago
parent a67e8c2863
commit 1300ba0887
  1. 9
      frontend/app/work_packages/controllers/dialogs/sorting.js

@ -52,13 +52,16 @@ module.exports = function(sortingModal, $scope, $filter, QueryService, I18n) {
// functions exposing available options to select2
$scope.getAvailableColumnsData = function(term, result) {
var filtered = $filter('filter')(getRemainingAvailableColumnsData(), { label: term }),
sorted = $filter('orderBy')(filtered, 'label');
var filterBy = term ? { label: term } : {},
filtered = $filter('filter')(getRemainingAvailableColumnsData(), filterBy),
sorted = $filter('orderBy')(filtered, 'label');
return result(sorted);
};
$scope.getDirectionsData = function(term, result) {
return result($filter('filter')($scope.availableDirectionsData, { label: term }));
var filterBy = term ? { label: term } : {};
return result($filter('filter')($scope.availableDirectionsData, filterBy));
};
// reduction of column options to columns that haven't been selected

Loading…
Cancel
Save