diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index 3ab7a514..92e363ac 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -355,6 +355,33 @@ KanbanUserstoryDirective = ($rootscope) -> module.directive("tgKanbanUserstory", ["$rootScope", KanbanUserstoryDirective]) +############################################################################# +## Kanban Squish Column Directive +############################################################################# + +KanbanSquishColumnDirective = -> + link = ($scope, $el, $attrs) -> + buttonFold = $el.find(".hfold") + buttonUnfold = $el.find(".hunfold") + + buttonFold.on "click", (event) -> + target = angular.element(event.currentTarget) + fold(target) + + buttonUnfold.on "click", (event) -> + target = angular.element(event.currentTarget) + unfold(target) + + fold = (target) -> + console.log 'fold' + + unfold = (target) -> + console.log 'unfold' + + return {link: link} + +module.directive("tgKanbanSquishColumn", KanbanSquishColumnDirective) + ############################################################################# ## Kaban WIP Limit Directive diff --git a/app/partials/views/modules/kanban-table.jade b/app/partials/views/modules/kanban-table.jade index cbb9f288..c32da5ea 100644 --- a/app/partials/views/modules/kanban-table.jade +++ b/app/partials/views/modules/kanban-table.jade @@ -1,11 +1,11 @@ -div.kanban-table +div.kanban-table(tg-kanban-squish-column) div.kanban-table-header div.kanban-table-inner(tg-kanban-row-width-fixer) - h2.task-colum-name(ng-repeat="s in usStatusList track by s.id", ng-style="{'border-top-color':s.color}") //Add '.fold' class here if folded + h2.task-colum-name(ng-repeat="s in usStatusList track by s.id", ng-style="{'border-top-color':s.color}") span(tg-bo-bind="s.name") div.options - a.icon.icon-vfold.hfold(href="", title="Fold Column") //Toggle hidden class if folded - a.icon.icon-vunfold.hunfold.hidden(href="", title="Unfold Column") //Toggle hidden class if folded + a.icon.icon-vfold.hfold(href="", title="Fold Column") + a.icon.icon-vunfold.hunfold.hidden(href="", title="Unfold Column") a.icon.icon-vfold(href="", title="Fold Cards", ng-if="statusViewModes[s.id] == 'maximized'", ng-click="ctrl.updateStatusViewMode(s.id, 'minimized')")