From 95f4e4b0149866cb71876e5860ba7549ec3bd155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Dec 2017 17:59:55 +0100 Subject: [PATCH] Update stack data after label update request has been processed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/CardController.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/controller/CardController.js b/js/controller/CardController.js index 5c1c87e79..0ebb557fa 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -100,13 +100,15 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo }; $scope.labelAssign = function (element, model) { - CardService.assignLabel($scope.cardId, element.id); - var card = CardService.getCurrent(); - StackService.updateCard(card); + CardService.assignLabel($scope.cardId, element.id).then(function (data) { + StackService.updateCard(CardService.getCurrent()); + }); }; $scope.labelRemove = function (element, model) { - CardService.removeLabel($scope.cardId, element.id); + CardService.removeLabel($scope.cardId, element.id).then(function (data) { + StackService.updateCard(CardService.getCurrent()); + }); }; $scope.setDuedate = function (duedate) {