Change statusList to taskStatusList in the taskboard

stable
David Barragán Merino 2014-06-25 16:08:47 +02:00
parent 24bc2840bc
commit ec789ce7db
2 changed files with 7 additions and 4 deletions

View File

@ -68,7 +68,8 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
return @rs.projects.get(@scope.projectId).then (project) =>
@scope.project = project
@scope.points = _.sortBy(project.points, "order")
@scope.statusList = _.sortBy(project.task_statuses, "id")
@scope.taskStatusList = _.sortBy(project.task_statuses, "order")
@scope.usStatusList = _.sortBy(project.us_statuses, "order")
return project
loadTaskboard: ->
@ -99,6 +100,7 @@ TaskboardDirective = ->
#########################
linkSortable = ($scope, $el, $attrs, $ctrl) ->
console.log "TaskboardDirective.linkSortable" #TODO
link = ($scope, $el, $attrs) ->
$ctrl = $el.controller()
@ -112,13 +114,14 @@ TaskboardDirective = ->
TaskboardTaskrowDirective = ->
link = ($scope, $el, $attrs) ->
taiga.bindOnce $scope, "statusList", (statuses) ->
taiga.bindOnce $scope, "taskStatusList", (statuses) ->
itemSize = 300 + (10 * statuses.length)
size = (1 + statuses.length) * itemSize
$el.css("width", size + "px")
return {link: link}
module = angular.module("taigaTaskboard", [])
module.controller("TaskboardController", TaskboardController)
module.directive("tgTaskboard", TaskboardDirective)

View File

@ -2,7 +2,7 @@ div.taskboard-table
div.taskboard-table-header
div.taskboard-table-inner(tg-taskboard-taskrow)
h2.task-colum_name "User story"
h2.task-colum_name(ng-repeat="s in statusList track by s.id", tg-bo-html="s.name")
h2.task-colum_name(ng-repeat="s in taskStatusList track by s.id", tg-bo-html="s.name")
div.taskboard-table-body
div.taskboard-table-inner
div.task-row(ng-repeat="us in userstories track by us.id", tg-taskboard-taskrow)
@ -24,5 +24,5 @@ div.taskboard-table
li Back
span 4.5
include ../components/addnewus
div.taskboard_task-playground.task-column(ng-repeat="s in statusList track by s.id")
div.taskboard_task-playground.task-column(ng-repeat="s in taskStatusList track by s.id")
include ../components/taskboard-task