diff --git a/js/controller/ListController.js b/js/controller/ListController.js index 0024ed1db..853d81243 100644 --- a/js/controller/ListController.js +++ b/js/controller/ListController.js @@ -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'); }; diff --git a/js/public/app.js b/js/public/app.js index 35e224abf..e49678e84 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -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 diff --git a/js/service/ApiService.js b/js/service/ApiService.js index 64f4d844d..f65dda515 100644 --- a/js/service/ApiService.js +++ b/js/service/ApiService.js @@ -28,6 +28,7 @@ app.factory('ApiService', function($http, $q){ this.q = $q; this.data = {}; this.id = null; + this.sorted = []; }; // TODO: Unify error messages diff --git a/templates/part.boardlist.php b/templates/part.boardlist.php index 837d913c2..3436c8db5 100644 --- a/templates/part.boardlist.php +++ b/templates/part.boardlist.php @@ -1,5 +1,5 @@
- +
diff --git a/templates/part.navigation.php b/templates/part.navigation.php index eedbeeb54..0e1efa11c 100644 --- a/templates/part.navigation.php +++ b/templates/part.navigation.php @@ -7,7 +7,7 @@
  • Public Boards
  • //--> -
  • +
  • {{ b.title }}