Fix column height on kanban.

stable
Andrey Antukh 2014-07-23 15:28:19 +02:00
parent 3f432905d7
commit dca82d63d4
1 changed files with 8 additions and 5 deletions

View File

@ -26,6 +26,7 @@ toggleText = @.taiga.toggleText
scopeDefer = @.taiga.scopeDefer scopeDefer = @.taiga.scopeDefer
bindOnce = @.taiga.bindOnce bindOnce = @.taiga.bindOnce
groupBy = @.taiga.groupBy groupBy = @.taiga.groupBy
timeout = @.taiga.timeout
module = angular.module("taigaKanban") module = angular.module("taigaKanban")
@ -41,12 +42,14 @@ KanbanSortableDirective = ($repo, $rs, $rootscope) ->
######################### #########################
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
mainPadding = 32 # px timeout 500, ->
elementOffset = $el.offset().top mainPadding = 32 # px
windowHeight = angular.element(window).height() elementOffset = $el.parent().parent().offset().top
columnHeight = windowHeight - elementOffset - mainPadding windowHeight = angular.element(window).height()
columnHeight = windowHeight - elementOffset - mainPadding
$el.css("height", "#{columnHeight}px") console.log elementOffset, windowHeight, columnHeight
$el.css("height", "#{columnHeight}px")
oldParentScope = null oldParentScope = null
newParentScope = null newParentScope = null