diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index 0efb39ad..5bb01b02 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -324,14 +324,18 @@ KanbanUserstoryDirective = ($rootscope) -> link = ($scope, $el, $attrs, $model) -> $el.disableSelection() + $scope.$watch "us", (us) -> + if us.is_blocked and not $el.hasClass("blocked") + $el.addClass("blocked") + else if not us.is_blocked and $el.hasClass("blocked") + $el.removeClass("blocked") + $el.find(".icon-edit").on "click", (event) -> if $el.find(".icon-edit").hasClass("noclick") return $scope.$apply -> $rootscope.$broadcast("usform:edit", $model.$modelValue) - if $scope.us.is_blocked - $el.addClass("blocked") $scope.$on "$destroy", -> $el.off()