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 = ->
link = ($scope, $el, $attrs) ->
bindOnce $scope, "usStatusList", (statuses) ->
itemSize = 310
size = (statuses.length * itemSize) - 10
$el.css("width", "#{size}px")
columnWidths = _.map statuses, (status) ->
if $scope.folds[status.id]
return 40
else
return 310
totalWidth = _.reduce columnWidths, (total, width) ->
return total + width
$el.css("width", totalWidth)
$scope.$on "$destroy", ->
$el.off()

View File

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