Remove tag from projects when deleted

This commit is contained in:
James Allen 2016-02-01 11:36:04 +00:00
parent 1ee0ef2cde
commit a0e129b880

View file

@ -24,6 +24,13 @@ define [
tag: () -> tag
)
modalInstance.result.then () ->
# Remove tag from projects
for project in $scope.projects
project.tags ||= []
index = project.tags.indexOf tag
if index > -1
project.tags.splice(index, 1)
# Remove tag
$scope.tags = $scope.tags.filter (t) -> t != tag
$scope.renameTag = (tag) ->