Fix board list sorting

This commit is contained in:
Julius Haertl
2016-08-24 02:29:53 +02:00
parent 5388f2af69
commit aae3660f4b
5 changed files with 10 additions and 10 deletions

View File

@@ -66,9 +66,8 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
$scope.filterData = function () {
console.log("filter");
angular.copy($scope.boardservice.getData(), $scope.boards);
$scope.boards = $filter('orderBy')($scope.boards, 'title');
console.log($scope.boards);
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
};

View File

@@ -444,9 +444,8 @@ app.controller('ListController', ["$scope", "$location", "$filter", "BoardServic
$scope.filterData = function () {
console.log("filter");
angular.copy($scope.boardservice.getData(), $scope.boards);
$scope.boards = $filter('orderBy')($scope.boards, 'title');
console.log($scope.boards);
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
};
@@ -715,6 +714,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){
this.q = $q;
this.data = {};
this.id = null;
this.sorted = [];
};
// TODO: Unify error messages

View File

@@ -28,6 +28,7 @@ app.factory('ApiService', function($http, $q){
this.q = $q;
this.data = {};
this.id = null;
this.sorted = [];
};
// TODO: Unify error messages