Broken kanban squish directive
parent
766fc94c02
commit
b8862380f8
|
@ -361,28 +361,34 @@ module.directive("tgKanbanUserstory", ["$rootScope", KanbanUserstoryDirective])
|
||||||
|
|
||||||
KanbanSquishColumnDirective = ->
|
KanbanSquishColumnDirective = ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
buttonFold = $el.find(".hfold")
|
|
||||||
buttonUnfold = $el.find(".hunfold")
|
|
||||||
|
|
||||||
buttonFold.on "click", (event) ->
|
#TODO: Only header is folding/unfolding so
|
||||||
|
# 1. Fold/Unfold also related column (.task-colum-name and .task-colum)
|
||||||
|
# 2. Save folded/unfolded column status
|
||||||
|
# 3. Recalculate container width
|
||||||
|
|
||||||
|
$el.on "click", ".hfold", (event) ->
|
||||||
target = angular.element(event.currentTarget)
|
target = angular.element(event.currentTarget)
|
||||||
fold(target)
|
fold(target)
|
||||||
|
|
||||||
buttonUnfold.on "click", (event) ->
|
$el.on "click", ".hunfold", (event) ->
|
||||||
target = angular.element(event.currentTarget)
|
target = angular.element(event.currentTarget)
|
||||||
unfold(target)
|
unfold(target)
|
||||||
|
|
||||||
fold = (target) ->
|
fold = (target) ->
|
||||||
console.log 'fold'
|
target.closest('.task-colum-name').addClass('fold')
|
||||||
|
target.toggleClass('hidden')
|
||||||
|
target.siblings('.hunfold').toggleClass('hidden')
|
||||||
|
|
||||||
unfold = (target) ->
|
unfold = (target) ->
|
||||||
console.log 'unfold'
|
target.closest('.task-colum-name').removeClass('fold')
|
||||||
|
target.toggleClass('hidden')
|
||||||
|
target.siblings('.hfold').toggleClass('hidden')
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
module.directive("tgKanbanSquishColumn", KanbanSquishColumnDirective)
|
module.directive("tgKanbanSquishColumn", KanbanSquishColumnDirective)
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Kaban WIP Limit Directive
|
## Kaban WIP Limit Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
|
@ -26,7 +26,7 @@ div.kanban-table(tg-kanban-squish-column)
|
||||||
div.kanban-uses-box.task-column(ng-repeat="status in usStatusList track by status.id",
|
div.kanban-uses-box.task-column(ng-repeat="status in usStatusList track by status.id",
|
||||||
tg-kanban-sortable,
|
tg-kanban-sortable,
|
||||||
tg-kanban-wip-limit,
|
tg-kanban-wip-limit,
|
||||||
tg-kanban-column-height-fixer) //Add '.fold' class here if folded
|
tg-kanban-column-height-fixer)
|
||||||
div.kanban-task(ng-repeat="us in usByStatus[status.id] track by us.id",
|
div.kanban-task(ng-repeat="us in usByStatus[status.id] track by us.id",
|
||||||
tg-kanban-userstory, ng-model="us",
|
tg-kanban-userstory, ng-model="us",
|
||||||
ng-class="ctrl.getCardClass(status.id)")
|
ng-class="ctrl.getCardClass(status.id)")
|
||||||
|
|
Loading…
Reference in New Issue