Recalculate Kanban Table Container Width on load page

stable
Xavier Julián 2014-11-17 12:59:05 +01:00
parent 53745273e6
commit 91c3b213e8
2 changed files with 9 additions and 3 deletions

View File

@ -283,9 +283,14 @@ module.directive("tgKanban", ["$tgRepo", "$rootScope", KanbanDirective])
KanbanRowWidthFixerDirective = -> KanbanRowWidthFixerDirective = ->
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
bindOnce $scope, "usStatusList", (statuses) -> bindOnce $scope, "usStatusList", (statuses) ->
itemSize = 310 columnWidths = _.map statuses, (status) ->
size = (statuses.length * itemSize) - 10 if $scope.folds[status.id]
$el.css("width", "#{size}px") return 40
else
return 310
totalWidth = _.reduce columnWidths, (total, width) ->
return total + width
$el.css("width", totalWidth)
$scope.$on "$destroy", -> $scope.$on "$destroy", ->
$el.off() $el.off()

View File

@ -34,6 +34,7 @@ $column-margin: 0 10px 0 0;
@include table-flex-child(1, 0, 0); @include table-flex-child(1, 0, 0);
max-width: $column-folded-width; max-width: $column-folded-width;
min-height: 2.5rem; min-height: 2.5rem;
min-width: $column-folded-width;
width: $column-folded-width; width: $column-folded-width;
} }
.kanban-task { .kanban-task {