Fixing admin tags area

stable
Alejandro Alonso 2016-11-25 09:01:38 +01:00
parent 151e1bb353
commit 5a5d6a933d
1 changed files with 5 additions and 3 deletions

View File

@ -719,14 +719,16 @@ class ProjectTagsController extends taiga.Controller
"$tgConfirm", "$tgConfirm",
"$tgResources", "$tgResources",
"$tgModel", "$tgModel",
"tgProjectService"
] ]
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @model) -> constructor: (@scope, @rootscope, @repo, @confirm, @rs, @model, @projectService) ->
@.loading = true @.loading = true
@rootscope.$on("project:loaded", @.loadTags) @.loadTags()
loadTags: => loadTags: =>
return @rs.projects.tagsColors(@scope.projectId).then (tags) => project = @projectService.project.toJS()
return @rs.projects.tagsColors(project.id).then (tags) =>
@scope.projectTagsAll = _.map tags.getAttrs(), (color, name) => @scope.projectTagsAll = _.map tags.getAttrs(), (color, name) =>
@model.make_model('tag', {name: name, color: color}) @model.make_model('tag', {name: name, color: color})
@.filterAndSortTags() @.filterAndSortTags()