Fix board list sorting
This commit is contained in:
@@ -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');
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -28,6 +28,7 @@ app.factory('ApiService', function($http, $q){
|
||||
this.q = $q;
|
||||
this.data = {};
|
||||
this.id = null;
|
||||
this.sorted = [];
|
||||
};
|
||||
|
||||
// TODO: Unify error messages
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="boardlist">
|
||||
<!--<table width="100%">
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="cell-board-bullet"></td>
|
||||
@@ -8,7 +8,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="b in boards"
|
||||
<tr data-ng-repeat="b in boardservice.sorted"
|
||||
ui-sref="board({boardId: b.id})">
|
||||
<td>
|
||||
<span class="board-bullet"
|
||||
@@ -50,5 +50,5 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>//-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<li><a href="#" class="icon-public">Public Boards</a></li>
|
||||
//-->
|
||||
|
||||
<li class="with-icon with-menu" data-ng-repeat="b in boards">
|
||||
<li class="with-icon with-menu" data-ng-repeat="b in boardservice.sorted">
|
||||
<span class="board-bullet" style="background-color:#{{b.color}};" ng-if="!b.status.edit"> </span>
|
||||
<a href="#/board/{{b.id}}/" ng-if="!b.status.edit">{{ b.title }}</a>
|
||||
<div class="app-navigation-entry-utils" ng-show="!b.status.edit" style="position:absolute;">
|
||||
|
||||
Reference in New Issue
Block a user