Fix label assignment issues

This commit is contained in:
Julius Haertl
2016-07-05 00:01:05 +02:00
parent 6feacc12a4
commit 68ff6571bd
6 changed files with 37 additions and 14 deletions

View File

@@ -157,7 +157,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
CardService.update(card);
CardService.reorder(card, order).then(function(data) {
StackService.data[newStack].cards = data;
StackService.data[newStack].addCard(card);
});
},
orderChanged: function (event) {

View File

@@ -38,8 +38,9 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
}
$scope.labelAssign = function(element, model) {
CardService.assignLabel($scope.cardId, element.id)
CardService.assignLabel($scope.cardId, element.id);
var card = CardService.getCurrent();
StackService.updateCard(card);
}
$scope.labelRemove = function(element, model) {
CardService.removeLabel($scope.cardId, element.id)

View File

@@ -259,7 +259,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat
CardService.update(card);
CardService.reorder(card, order).then(function(data) {
StackService.data[newStack].cards = data;
StackService.data[newStack].addCard(card);
});
},
orderChanged: function (event) {
@@ -334,8 +334,9 @@ app.controller('CardController', ["$scope", "$rootScope", "$routeParams", "$loca
}
$scope.labelAssign = function(element, model) {
CardService.assignLabel($scope.cardId, element.id)
CardService.assignLabel($scope.cardId, element.id);
var card = CardService.getCurrent();
StackService.updateCard(card);
}
$scope.labelRemove = function(element, model) {
CardService.removeLabel($scope.cardId, element.id)