From bc77cad4eabebf8de598e20819e8e75d65622e32 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 23 Jul 2014 09:44:35 +0200 Subject: [PATCH] Minor fixes on kanban page. --- app/coffee/modules/kanban/main.coffee | 13 +++++++++++-- app/partials/views/modules/kanban-table.jade | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index dffe80b9..3bf99633 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -165,6 +165,10 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi when "standard" then @rootscope.$broadcast("usform:new", statusId) when "bulk" then @rootscope.$broadcast("usform:bulk", statusId) + changeUsAssignedTo: (us) -> + @rootscope.$broadcast("assigned-to:add", us) + + # Scope Events Handlers onNewUserstory: (ctx, us) -> @scope.usByStatus[us.status].splice(0, 0, us) @@ -191,9 +195,14 @@ module.directive("tgKanban", ["$tgRepo", "$rootScope", KanbanDirective]) ############################################################################# KanbanUserstoryDirective = -> - link = ($scope, $el, $attrs) -> + link = ($scope, $el, $attrs, $model) -> $el.disableSelection() - return {link:link} + + return { + templateUrl: "/partials/views/components/kanban-task.html" + link:link + require: "ngModel" + } module.directive("tgKanbanUserstory", KanbanUserstoryDirective) diff --git a/app/partials/views/modules/kanban-table.jade b/app/partials/views/modules/kanban-table.jade index 9d84b916..d8aa18d6 100644 --- a/app/partials/views/modules/kanban-table.jade +++ b/app/partials/views/modules/kanban-table.jade @@ -11,5 +11,4 @@ div.kanban-table div.kanban-uses-box.task-column(ng-repeat="status in usStatusList track by status.id", tg-kanban-sortable) div.kanban-task(ng-repeat="us in usByStatus[status.id] track by us.id", - tg-kanban-userstory) - include ../components/kanban-task + tg-kanban-userstory, ng-model="us")