зеркало из https://github.com/nextcloud/deck.git
Fix board list sorting
This commit is contained in:
Родитель
5388f2af69
Коммит
aae3660f4b
|
@ -66,9 +66,8 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
|
||||||
|
|
||||||
$scope.filterData = function () {
|
$scope.filterData = function () {
|
||||||
console.log("filter");
|
console.log("filter");
|
||||||
angular.copy($scope.boardservice.getData(), $scope.boards);
|
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
|
||||||
$scope.boards = $filter('orderBy')($scope.boards, 'title');
|
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
|
||||||
console.log($scope.boards);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -444,9 +444,8 @@ app.controller('ListController', ["$scope", "$location", "$filter", "BoardServic
|
||||||
|
|
||||||
$scope.filterData = function () {
|
$scope.filterData = function () {
|
||||||
console.log("filter");
|
console.log("filter");
|
||||||
angular.copy($scope.boardservice.getData(), $scope.boards);
|
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
|
||||||
$scope.boards = $filter('orderBy')($scope.boards, 'title');
|
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
|
||||||
console.log($scope.boards);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -715,6 +714,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){
|
||||||
this.q = $q;
|
this.q = $q;
|
||||||
this.data = {};
|
this.data = {};
|
||||||
this.id = null;
|
this.id = null;
|
||||||
|
this.sorted = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Unify error messages
|
// TODO: Unify error messages
|
||||||
|
|
|
@ -28,6 +28,7 @@ app.factory('ApiService', function($http, $q){
|
||||||
this.q = $q;
|
this.q = $q;
|
||||||
this.data = {};
|
this.data = {};
|
||||||
this.id = null;
|
this.id = null;
|
||||||
|
this.sorted = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Unify error messages
|
// TODO: Unify error messages
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div id="boardlist">
|
<div id="boardlist">
|
||||||
<!--<table width="100%">
|
<table width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cell-board-bullet"></td>
|
<td class="cell-board-bullet"></td>
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr data-ng-repeat="b in boards"
|
<tr data-ng-repeat="b in boardservice.sorted"
|
||||||
ui-sref="board({boardId: b.id})">
|
ui-sref="board({boardId: b.id})">
|
||||||
<td>
|
<td>
|
||||||
<span class="board-bullet"
|
<span class="board-bullet"
|
||||||
|
@ -50,5 +50,5 @@
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>//-->
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<li><a href="#" class="icon-public">Public Boards</a></li>
|
<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>
|
<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>
|
<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;">
|
<div class="app-navigation-entry-utils" ng-show="!b.status.edit" style="position:absolute;">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче