Recalculate Kanban Table Container Width on load page
parent
53745273e6
commit
91c3b213e8
|
@ -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()
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue