From ba6be01b18d8d3d3141efc6d29b6ec825a0efd46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 25 Jun 2014 18:10:06 +0200 Subject: [PATCH] WIP in the taskboard --- app/coffee/modules/common/directives.coffee | 21 ------------------- app/coffee/modules/taskboard.coffee | 11 ++++++++++ app/partials/views/components/addnewtask.jade | 5 +++++ .../views/modules/taskboard-table.jade | 18 ++++++++-------- app/styles/modules/taskboard-table.scss | 12 +++++------ 5 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 app/partials/views/components/addnewtask.jade diff --git a/app/coffee/modules/common/directives.coffee b/app/coffee/modules/common/directives.coffee index 8ebf94f1..8a4bc82e 100644 --- a/app/coffee/modules/common/directives.coffee +++ b/app/coffee/modules/common/directives.coffee @@ -57,27 +57,6 @@ SprintProgressBarDirective = -> return {link: link} -UsStatusDisplay = -> - ### - Show the name of a US status by id. - It need usStatusList in the $scope. - - Example: - - - ### - link = ($scope, $el, $attrs) -> - $scope.$watch $attrs.tgUsStatusDisplay, (status_id) -> - if status_id is undefined - return - - status_name = $scope.usStatusList[status_id].name - $el.html(status_name) - - return {link:link} - - module = angular.module("taigaCommon") module.directive("tgDateRange", DateRangeDirective) module.directive("tgSprintProgressbar", SprintProgressBarDirective) -module.directive("tgUsStatusDisplay", UsStatusDisplay) diff --git a/app/coffee/modules/taskboard.coffee b/app/coffee/modules/taskboard.coffee index ef9dffca..1734f563 100644 --- a/app/coffee/modules/taskboard.coffee +++ b/app/coffee/modules/taskboard.coffee @@ -122,7 +122,18 @@ TaskboardTaskrowDirective = -> return {link: link} +UsStatus = -> + link = ($scope, $el, $attrs) -> + $scope.$watch "#{$attrs.tgTaskboardUsStatus}.status", (status_id) -> + if status_id is undefined + return + status_name = $scope.usStatusList[status_id].name + $el.html(status_name) + + return {link:link} + module = angular.module("taigaTaskboard", []) module.controller("TaskboardController", TaskboardController) module.directive("tgTaskboard", TaskboardDirective) module.directive("tgTaskboardTaskrow", TaskboardTaskrowDirective) +module.directive("tgTaskboardUsStatus", UsStatus) diff --git a/app/partials/views/components/addnewtask.jade b/app/partials/views/components/addnewtask.jade new file mode 100644 index 00000000..144c9539 --- /dev/null +++ b/app/partials/views/components/addnewtask.jade @@ -0,0 +1,5 @@ +div.new-task + a.button.button-green(href="", ng-click="ctrl.addNewTask(us, 'standakd')", title="Add new task") + span.text + Add new Task + a.button.button-bulk(href="", ng-click="ctrl.addNewTask(us, 'bulk')", title="Add new tasks in bulk") + span.icon.icon-bulk diff --git a/app/partials/views/modules/taskboard-table.jade b/app/partials/views/modules/taskboard-table.jade index 2faf80f1..13cbcbbe 100644 --- a/app/partials/views/modules/taskboard-table.jade +++ b/app/partials/views/modules/taskboard-table.jade @@ -6,15 +6,14 @@ div.taskboard-table div.taskboard-table-body div.taskboard-table-inner div.task-row(ng-repeat="us in userstories track by us.id", tg-taskboard-taskrow) - div.taskboard_task-list.task-column + div.taskboard_us-list.task-column div.tag-list - - for(var y = 0; y < 5; y++) - include ../components/tag - h3.task-title - span.task-num 125 - span Invitacion de los usuarios a la plataforma - ul.task-list - li.task-status Open + span.tag(ng-repeat="tag in us.tags") {{ tag }} + h3.us-title + span.us-ref(tg-bo-ref="us.ref") + span(ng-bind="us.subject") + div.us-status(tg-taskboard-us-status="us") + ul.points-list li UX span 4.5 li DiseƱo @@ -23,6 +22,7 @@ div.taskboard-table span 4.5 li Back span 4.5 - include ../components/addnewus + include ../components/addnewtask + div.taskboard_task-playground.task-column(ng-repeat="s in taskStatusList track by s.id") include ../components/taskboard-task diff --git a/app/styles/modules/taskboard-table.scss b/app/styles/modules/taskboard-table.scss index e16ac1cc..9c3be1d6 100644 --- a/app/styles/modules/taskboard-table.scss +++ b/app/styles/modules/taskboard-table.scss @@ -55,32 +55,32 @@ $column-margin: 0 10px 0 0; } } -.taskboard_task-list { +.taskboard_us-list { position: relative; .tag-list { display: none; margin-bottom: 1rem; } - .task-title { + .us-title { @extend %large; font-family: 'DroidSans'; margin-bottom: 1rem; } - .task-num { + .us-ref { color: $gray; margin-right: .5rem; } - .task-status { + .us-status { color: $green-taiga; margin-bottom: .5rem; } - .task-list { + .points-list { span { color: $gray; margin-left: .5rem; } } - .new-us { + .new-task { bottom: 2rem; position: absolute; }