This commit is contained in:
Julius Haertl
2016-06-20 10:44:41 +02:00
parent ba8283dcdf
commit c0a9f010a8
28 changed files with 691 additions and 106 deletions

View File

@@ -7,18 +7,25 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
$scope.stackservice = StackService;
$scope.boardservice = BoardService;
$scope.statusservice = StatusService;
$scope.statusservice = StatusService.getInstance();
// fetch data
StackService.clear();
$scope.statusservice.retainWaiting();
$scope.statusservice.retainWaiting();
console.log("foo");
StackService.fetchAll($scope.id).then(function(data) {
console.log(data);
$scope.statusservice.releaseWaiting();
}, function(error) {
$scope.statusservice.setError('Error occured', error);
});
BoardService.fetchOne($scope.id).then(function(data) {
$scope.statusservice.releaseWaiting();
}, function(error) {
$scope.statusservice.setError('Error occured', error);
@@ -48,6 +55,12 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
});
}
$scope.cardDelete = function(card) {
CardService.delete(card.id);
StackService.deleteCard(card);
}
// Lighten Color of the board for background usage
$scope.rgblight = function (hex) {
var result = /^([A-Fa-f\d]{2})([A-Fa-f\d]{2})([A-Fa-f\d]{2})$/i.exec(hex);