Add projects to tag after creating the tag

This commit is contained in:
James Allen 2014-10-09 08:39:15 +01:00
parent 3bf7948510
commit bc94ea56cb

View file

@ -196,11 +196,12 @@ define [
$scope.createTag = (name) ->
event_tracking.send 'project-list-page-interaction', 'project action', 'createTag'
$scope.tags.push {
$scope.tags.push tag = {
name: name
project_ids: []
showWhenEmpty: true
}
return tag
$scope.openNewTagModal = (e) ->
modalInstance = $modal.open(
@ -210,11 +211,8 @@ define [
modalInstance.result.then(
(newTagName) ->
$scope.createTag(newTagName)
console.log $scope.tag, $scope.addSelectedProjectsToTag, newTagName
$scope.addSelectedProjectsToTag($scope.tag)
# add selected projects to this new tag
tag = $scope.createTag(newTagName)
$scope.addSelectedProjectsToTag(tag)
)
$scope.createProject = (name, template = "none") ->