Add generic lightbox

stable
Álex Hermida 2018-07-04 17:13:41 +02:00 committed by Alex Hermida
parent 4e2d1ddf34
commit 93c2c45efb
28 changed files with 214 additions and 157 deletions

View File

@ -543,7 +543,6 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
@rs2.attachments.list("us", us.id, projectId).then (attachments) =>
@rootscope.$broadcast("genericform:edit", {
'objType': 'us',
'statusList': @scope.usStatusList,
'obj': us,
'attachments': attachments.toJS()
})
@ -574,8 +573,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
when "standard" then @rootscope.$broadcast("genericform:new",
{
'objType': 'us',
'project': @scope.project,
'statusList': @scope.usStatusList
'project': @scope.project
})
when "bulk" then @rootscope.$broadcast("usform:bulk", @scope.projectId,
@scope.project.default_us_status)

View File

@ -773,9 +773,11 @@ module.directive("tgLbSetDueDate", ["lightboxService", "$tgLoading", "$translate
## Create/Edit Lightbox Directive
#############################################################################
groupBy = @.taiga.groupBy
CreateEditDirective = (
$log, $repo, $model, $rs, $rootScope, lightboxService, $loading, $translate,
$confirm, $q, attachmentsService) ->
$confirm, $q, attachmentsService, $template, $compile) ->
link = ($scope, $el, attrs) ->
form = null
schemas = {
@ -783,50 +785,68 @@ $confirm, $q, attachmentsService) ->
objName: 'User Story',
model: 'userstories',
params: { include_attachments: true, include_tasks: true },
requiredAttrs: ['project'],
data: (project) ->
return {
statusList: _.sortBy(project.us_statuses, "order")
}
initialData: (data) ->
return {
project: data.project.id
subject: ""
description: ""
tags: []
points : {}
status: data.project.default_us_status
is_archived: false
tags: []
subject: ""
description: ""
}
}
task: {
objName: 'Task',
model: 'tasks',
params: { include_attachments: true },
requiredAttrs: ['project', 'sprintId', 'usId'],
data: (project) ->
return {
statusList: _.sortBy(project.task_statuses, "order")
}
initialData: (data) ->
return {
project: data.project.id
milestone: data.sprintId
user_story: data.usId
is_archived: false
status: data.project.default_task_status
subject: ""
description: ""
assigned_to: null
tags: [],
subject: "",
description: "",
tags: []
milestone: data.sprintId
status: data.project.default_task_status
user_story: data.us
is_archived: false
}
},
issue: {
objName: 'Issue',
model: 'issues',
params: { include_attachments: true },
requiredAttrs: ['project', 'typeList', 'typeById', 'severityList', 'priorityList'],
data: (project) ->
return {
project: project
statusList: _.sortBy(project.issue_statuses, "order")
typeById: groupBy(project.issue_types, (x) -> x.id)
typeList: _.sortBy(project.issue_types, "order")
severityById: groupBy(project.severities, (x) -> x.id)
severityList: _.sortBy(project.severities, "order")
priorityById: groupBy(project.priorities, (x) -> x.id)
priorityList: _.sortBy(project.priorities, "order")
}
initialData: (data) ->
return {
project: data.project.id
subject: ""
status: data.project.default_issue_status
type: data.project.default_issue_type
assigned_to: null
milestone: data.sprintId
priority: data.project.default_priority
project: data.project.id
severity: data.project.default_severity
status: data.project.default_issue_status
subject: ""
tags: []
type: data.project.default_issue_type
}
}
}
@ -835,30 +855,26 @@ $confirm, $q, attachmentsService) ->
attachmentsToDelete = Immutable.List()
$scope.$on "genericform:new", (ctx, data) ->
if beforeMount('new', data, ['objType', 'statusList', ])
if beforeMount('new', data, ['project'])
mountCreateForm(data)
afterMount()
$scope.$on "genericform:edit", (ctx, data) ->
if beforeMount('edit', data, ['objType', 'statusList', 'obj', 'attachments'])
if beforeMount('edit', data, ['project', 'obj', 'attachments'])
mountUpdateForm(data)
afterMount()
beforeMount = (mode, data, requiredAttrs) ->
form.reset() if form
$el.find(".tag-input").val("")
# Get form schema
if !data.objType || !schemas[data.objType]
return $log.error(
"Invalid objType `#{data.objType}` for `genericform:#{mode}` event")
$scope.objType = data.objType
$scope.schema = schemas[data.objType]
# Get required attrs for creation from objType schema
if mode == 'new'
requiredAttrs = $scope.schema.requiredAttrs.concat(requiredAttrs)
# Check if required attrs for creating are present
# Get required attrs of the directive
getAttrs(mode, data, requiredAttrs)
return true
@ -867,25 +883,26 @@ $confirm, $q, attachmentsService) ->
$scope.obj = $model.make_model($scope.schema.model, $scope.schema.initialData(data))
$scope.isNew = true
$scope.attachments = Immutable.List()
# Update texts for creation
$el.find(".button-green").html($translate.instant("COMMON.CREATE"))
$el.find(".title").html($translate.instant(
"LIGHTBOX.CREATE_EDIT.NEW", { objName: $scope.schema.objName }))
$el.find(".blocked-note").addClass("hidden")
$scope.text = {
title: $translate.instant("LIGHTBOX.CREATE_EDIT.NEW", { objName: $scope.schema.objName })
action: $translate.instant("COMMON.CREATE")
}
render()
mountUpdateForm = (data) ->
$scope.isNew = false
$scope.attachments = Immutable.fromJS($scope.attachments)
# Update texts for edition
$el.find(".button-green").html($translate.instant("COMMON.SAVE"))
$el.find(".title").html($translate.instant(
"LIGHTBOX.CREATE_EDIT.EDIT", { objName: $scope.schema.objName }))
$scope.text = {
title: $translate.instant("LIGHTBOX.CREATE_EDIT.EDIT", { objName: $scope.schema.objName })
action: $translate.instant("COMMON.SAVE")
}
render()
afterMount = () ->
resetAttachments()
setStatus($scope.obj.status)
setStatus($scope.obj?.status)
$scope.createEditOpen = true
lightboxService.open $el, () ->
$scope.createEditOpen = false
@ -1073,6 +1090,16 @@ $confirm, $q, attachmentsService) ->
$scope.isClientRequirement = () ->
return $scope.obj?.client_requirement
render = () ->
templatePath = "common/lightbox/lightbox-create-edit/lb-create-edit-#{$scope.objType}.html"
template = $template.get(templatePath, true)
_.map $scope.schema.data($scope.project), (value, key) ->
$scope[key] = value
html = $compile(template($scope))($scope)
$el.html(html)
return {
link: link
}
@ -1088,6 +1115,8 @@ module.directive("tgLbCreateEdit", [
"$translate",
"$tgConfirm",
"$q",
"tgAttachmentsService"
"tgAttachmentsService",
"$tgTemplate",
"$compile",
CreateEditDirective
])

View File

@ -370,12 +370,7 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
project = @projectService.project.toJS()
@rootscope.$broadcast("genericform:new", {
'objType': 'issue',
'statusList': @scope.issueStatusList,
'project': project,
'severityList': @scope.severityList,
'priorityList': @scope.priorityList,
'typeById': groupBy(project.issue_types, (x) -> x.id),
'typeList': _.sortBy(project.issue_types, "order")
'project': project
})
addIssuesInBulk: ->

View File

@ -167,8 +167,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
when "standard" then @rootscope.$broadcast("genericform:new",
{
'objType': 'us',
'project': @scope.project,
'statusList': @scope.usStatusList
'project': @scope.project
})
when "bulk" then @rootscope.$broadcast("usform:bulk",
@scope.projectId, statusId)

View File

@ -58,7 +58,7 @@ KanbanSortableDirective = ($repo, $rs, $rootscope) ->
itemEl.off()
itemEl.remove()
containers = _.map $el.find('.task-column'), (item) ->
containers = _.map $el.find('.taskboard-column'), (item) ->
return item
drake = dragula(containers, {

View File

@ -30,8 +30,8 @@ module = angular.module("taigaRelatedTasks", [])
RelatedTaskRowDirective = ($repo, $compile, $confirm, $rootscope, $loading, $template, $translate, $emojis) ->
templateView = $template.get("task/related-task-row.html", true)
templateEdit = $template.get("task/related-task-row-edit.html", true)
templateView = $template.get("task/related-taskboard-row.html", true)
templateEdit = $template.get("task/related-taskboard-row-edit.html", true)
link = ($scope, $el, $attrs, $model) ->
@childScope = $scope.$new()

View File

@ -314,21 +314,40 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
@.refreshTagsColors().then () =>
@taskboardTasksService.replaceModel(task)
@scope.$on "issueform:new:success", (event, issue) =>
@.refreshTagsColors().then () =>
@taskboardIssuesService.add(issue)
@analytics.trackEvent("issue", "create", "create issue on taskboard", 1)
@scope.$on "issueform:edit:success", (event, issue) =>
@.refreshTagsColors().then () =>
@taskboardIssuesService.replaceModel(issue)
@scope.$on "taskboard:task:deleted", (event, task) =>
@.loadTasks()
@scope.$on("taskboard:task:move", @.taskMove)
@scope.$on("assigned-to:added", @.onAssignedToChanged)
onAssignedToChanged: (ctx, userid, taskModel) ->
taskModel.assigned_to = userid
onAssignedToChanged: (ctx, userid, model) ->
if model.getName() == 'tasks'
model.assigned_to = userid
@taskboardTasksService.replaceModel(model)
@taskboardTasksService.replaceModel(taskModel)
@repo.save(model).then =>
@.generateFilters()
if @.isFilterDataTypeSelected('assigned_to') || @.isFilterDataTypeSelected('role')
@.loadTasks()
if model.getName() == 'issues'
model.assigned_to = userid
@taskboardIssuesService.replaceModel(model)
@repo.save(model).then =>
@.generateFilters()
if @.isFilterDataTypeSelected('assigned_to') || @.isFilterDataTypeSelected('role')
@.loadIssues()
@repo.save(taskModel).then =>
@.generateFilters()
if @.isFilterDataTypeSelected('assigned_to') || @.isFilterDataTypeSelected('role')
@.loadTasks()
initializeSubscription: ->
routingKey = "changes.project.#{@scope.projectId}.tasks"
@ -408,7 +427,6 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
params.include_attachments = 1
params = _.merge params, @location.search()
console.log '@scope.sprintId tasks', @scope.sprintId
return @rs.tasks.list(@scope.projectId, @scope.sprintId, null, params).then (tasks) =>
@taskboardTasksService.init(@scope.project, @scope.usersById)
@taskboardTasksService.set(tasks)
@ -462,13 +480,31 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
@rootscope.$broadcast("genericform:edit", {
'objType': 'task',
'obj': editingTask,
'statusList': @scope.taskStatusList,
'project': @scope.project,
'sprintId': @scope.sprintId,
'attachments': attachments.toJS()
})
task = task.set('loading', false)
task = task.set('loading-edit', false)
@taskboardTasksService.replace(task)
editIssue: (id) ->
issue = @.taskboardIssuesService.getIssue(id)
issue = issue.set('loading-edit', true)
@rs.issues.getByRef(issue.getIn(['model', 'project']), issue.getIn(['model', 'ref']))
.then (editingIssue) =>
@rs2.attachments.list("issue", issue.get('id'), issue.getIn(['model', 'project']))
.then (attachments) =>
@rootscope.$broadcast("genericform:edit", {
'objType': 'issue',
'obj': editingIssue,
'project': @scope.project,
'sprintId': @scope.sprintId,
'attachments': attachments.toJS()
})
issue = issue.set('loading-edit', false)
deleteTask: (id) ->
task = @.taskboardTasksService.getTask(id)
task = task.set('loading-delete', true)
@ -525,14 +561,18 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
'objType': 'task',
'project': @scope.project,
'sprintId': @scope.sprintId,
'usId': us?.id,
'status': @scope.project.default_task_status,
'statusList': @scope.taskStatusList
'usId': us?.id
})
when "bulk" then @rootscope.$broadcast("taskform:bulk", @scope.sprintId, us?.id)
addNewIssue: (type, us) ->
switch type
when "standard" then @rootscope.$broadcast("genericform:new",
{
'objType': 'issue',
'project': @scope.project,
'sprintId': @scope.sprintId
})
when "standard" then @rootscope.$broadcast("taskform:new", @scope.sprintId, us?.id)
when "bulk" then @rootscope.$broadcast("taskform:bulk", @scope.sprintId, us?.id)
@ -544,6 +584,11 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
@rootscope.$broadcast("assigned-to:add", task)
changeIssueAssignedTo: (id) ->
issue = @taskboardIssuesService.getIssueModel(id)
@rootscope.$broadcast("assigned-to:add", issue)
setRolePoints: () ->
computableRoles = _.filter(@scope.project.roles, "computable")
@ -676,12 +721,14 @@ TaskboardSquishColumnDirective = (rs) ->
$el.find('.taskboard-table-inner').css("width", totalWidth)
columnWidths.pop()
issuesRowWidth = _.reduce columnWidths, (total, width) ->
return total + width
issuesBoxWidth = $el.find('.issues-row .taskboard-row-title-box').outerWidth(true)
$el.find('.issues-row').css("width", totalWidth - columnWidths.pop())
issuesBoxWidth = $el.find('.issues-row .taskboard-issues-box').outerWidth(true)
$el.find('.issues-row').css("width", issuesRowWidth)
issuesCardBoxMaxHeight = if $scope.ctrl.zoomLevel == '0' then 260 else 390
$el.find('.issues-row .taskboard-cards-box').css("max-height", issuesCardBoxMaxHeight)
issueCardMaxWidth = if $scope.ctrl.zoomLevel == '0' then 128 else 280
$el.find('.issues-row .taskboard-cards-box .card').css("max-width", issueCardMaxWidth)
recalculateStatusColumnWidth = (statusId) =>
#unassigned ceil

View File

@ -62,13 +62,13 @@ TaskboardSortableDirective = ($repo, $rs, $rootscope, $translate) ->
itemEl.off()
itemEl.remove()
containers = _.map $el.find('.task-column'), (item) ->
containers = _.map $el.find('.taskboard-column'), (item) ->
return item
drake = dragula(containers, {
copySortSource: false,
copy: false,
accepts: (el, target) -> return !$(target).hasClass('taskboard-userstory-box')
accepts: (el, target) -> return !$(target).hasClass('taskboard-row-title-box')
moves: (item) ->
return $(item).is('tg-card')
})

View File

@ -46,7 +46,6 @@ class TaskboardIssuesService extends taiga.Service
return _.find @.issuesRaw, (issue) -> return issue.id == id
replaceModel: (issue) ->
console.log 'replacesModel'
@.issuesRaw = _.map @.issuesRaw, (item) ->
if issue.id == item.id
return issue
@ -58,7 +57,6 @@ class TaskboardIssuesService extends taiga.Service
refresh: ->
issues = []
for issueModel in @.issuesRaw
console.log issueModel
issue = {}
model = issueModel.getAttrs()
@ -73,6 +71,5 @@ class TaskboardIssuesService extends taiga.Service
issues.push(issue)
@.milestoneIssues = Immutable.fromJS(issues)
console.log @.milestoneIssues, 'milestoneIssues'
angular.module("taigaKanban").service("tgTaskboardIssues", TaskboardIssuesService)

View File

@ -22,7 +22,6 @@ Resource = (urlsService, http) ->
service.listInAllProjects = (params) ->
url = urlsService.resolve("issues")
console.log 'resource issues url', url
httpOptions = {
headers: {
"x-disable-pagination": "1"

View File

@ -22,7 +22,6 @@ Resource = (urlsService, http) ->
service.listInAllProjects = (params) ->
url = urlsService.resolve("tasks")
console.log 'resoruce tasks url', url
httpOptions = {
headers: {
"x-disable-pagination": "1"

View File

@ -124,7 +124,6 @@ div.wrapper(tg-backlog, ng-controller="BacklogController as ctrl",
include ../includes/modules/sprints
div.lightbox.lightbox-generic-form.lightbox-create-edit(tg-lb-create-edit)
include ../includes/modules/lightbox-create-edit/lb-create-edit-us
div.lightbox.lightbox-generic-bulk(tg-lb-create-bulk-userstories)
include ../includes/modules/lightbox-us-bulk

View File

@ -8,15 +8,15 @@ block options
)
div.ticket-data-container
tg-issue-type-button.ticket-status(
autosave="false"
not-auto-save="true"
ng-model="obj"
)
tg-issue-severity-button.ticket-status(
autosave="false"
not-auto-save="true"
ng-model="obj"
)
tg-issue-priority-button.ticket-status(
autosave="false"
not-auto-save="true"
ng-model="obj"
)

View File

@ -1,7 +1,7 @@
tg-lightbox-close
form
h2.title(translate="LIGHTBOX.CREATE_EDIT.TITLE_NEW")
h2.title {{ text.title }}
div.form-wrapper
main
fieldset
@ -57,10 +57,6 @@ form
block options
button.button-green.submit-button(
type="submit"
title="{{'COMMON.CREATE' | translate}}"
translate="COMMON.CREATE"
)
button.button-green.submit-button(type="submit") {{ text.action }}
div.lightbox.lightbox-select-user(tg-lb-assignedto)

View File

@ -62,7 +62,7 @@ div.kanban-table(
div.kanban-table-body
div.kanban-table-inner
div.kanban-uses-box.task-column(ng-class='{vfold:folds[s.id]}',
div.kanban-uses-box.taskboard-column(ng-class='{vfold:folds[s.id]}',
ng-repeat="s in ::usStatusList track by s.id",
tg-kanban-wip-limit="s",
tg-kanban-column-height-fixer,

View File

@ -9,7 +9,7 @@ section.related-tasks(
.row.single-related-task.js-related-task(
ng-repeat="task in tasks"
ng-class="{closed: task.is_closed, blocked: task.is_blocked, iocaine: task.is_iocaine}"
tg-related-task-row
tg-related-taskboard-row
ng-model="task"
)
div(tg-related-task-create-form)

View File

@ -31,8 +31,11 @@ div.taskboard-table(
div.taskboard-table-body(tg-taskboard-table-height-fixer)
div.taskboard-table-inner
div.task-row(ng-repeat="us in userstories track by us.id", ng-class="{blocked: us.is_blocked, 'row-fold':usFolded[us.id]}")
div.taskboard-userstory-box.task-column(tg-bo-title="us.blocked_note")
div.taskboard-row(
ng-repeat="us in userstories track by us.id",
ng-class="{blocked: us.is_blocked, 'row-fold':usFolded[us.id]}"
)
div.taskboard-row-title-box.taskboard-column(tg-bo-title="us.blocked_note")
tg-svg.vfold.fold-action(
svg-icon="icon-fold-row",
ng-click='foldUs(us.id)'
@ -65,7 +68,7 @@ div.taskboard-table(
include ../components/addnewtask
div.taskboard-tasks-box.task-column(
div.taskboard-cards-box.taskboard-column(
ng-repeat="st in ::taskStatusList track by st.id",
class="squish-status-{{st.id}}",
ng-class="{'column-fold':statusesFolded[st.id]}",
@ -90,8 +93,8 @@ div.taskboard-table(
zoom-level="ctrl.zoomLevel"
type="task"
)
div.task-row(ng-init="us = null", ng-class="{'row-fold':usFolded[null]}")
div.taskboard-userstory-box.task-column
div.taskboard-row(ng-init="us = null", ng-class="{'row-fold':usFolded[null]}")
div.taskboard-row-title-box.taskboard-column
a.vfold(
href=""
title="{{'TASKBOARD.TABLE.TITLE_ACTION_FOLD_ROW' | translate}}"
@ -110,7 +113,7 @@ div.taskboard-table(
span(translate="TASKBOARD.TABLE.ROW_UNASSIGED_TASKS_TITLE")
include ../components/addnewtask.jade
div.taskboard-tasks-box.task-column(
div.taskboard-cards-box.taskboard-column(
ng-repeat="st in ::taskStatusList track by st.id",
class="squish-status-{{st.id}}",
ng-class="{'column-fold':statusesFolded[st.id]}",
@ -136,8 +139,8 @@ div.taskboard-table(
zoom-level="ctrl.zoomLevel"
type="task"
)
div.issues-row
div.taskboard-issues-box.task-column
div.taskboard-row.issues-row(ng-class="{'row-fold':usFolded[0]}")
div.taskboard-row-title-box.taskboard-column
a.vfold(
href=""
title="{{'TASKBOARD.TABLE.TITLE_ACTION_FOLD_ROW' | translate}}"
@ -155,20 +158,19 @@ div.taskboard-table(
h3.task-colum-name(translate="TASKBOARD.TABLE.ROW_ISSUES_TITLE")
include ../components/addnewissue.jade
div.taskboard-tasks-box.issues-cell
div
tg-card.card.ng-animate-disabled(
tg-repeat="issue in milestoneIssues"
ng-class="{'kanban-task-maximized': ctrl.isMaximized(s.id), 'kanban-task-minimized': ctrl.isMinimized(s.id)}"
tg-class-permission="{'readonly': '!modify_task'}"
tg-bind-scope,
on-toggle-fold="ctrl.toggleFold(id)"
on-click-edit="ctrl.editTask(id)"
on-click-delete="ctrl.deleteTask(id)"
on-click-assigned-to="ctrl.changeTaskAssignedTo(id)"
project="project"
item="issue"
zoom="ctrl.zoom"
zoom-level="ctrl.zoomLevel"
type="issue"
)
div.taskboard-cards-box
tg-card.card.ng-animate-disabled(
tg-repeat="issue in milestoneIssues"
class="kanban-task-minimized"
tg-class-permission="{'readonly': '!modify_issue'}"
tg-bind-scope,
on-toggle-fold="ctrl.toggleFold(id)"
on-click-edit="ctrl.editIssue(id)"
on-click-delete="ctrl.deleteTask(id)"
on-click-assigned-to="ctrl.changeIssueAssignedTo(id)"
project="project"
item="issue"
zoom="ctrl.zoom"
zoom-level="ctrl.zoomLevel"
type="issue"
)

View File

@ -34,7 +34,6 @@ div.wrapper.issues.lightbox-generic-form(
div.lightbox.lightbox-select-user(tg-lb-assignedto)
div.lightbox.lightbox-generic-form.lightbox-create-edit(tg-lb-create-edit)
include ../includes/modules/lightbox-create-edit/lb-create-edit-issue
div.lightbox.lightbox-generic-bulk(tg-lb-create-bulk-issues)
include ../includes/modules/lightbox-issue-bulk

View File

@ -41,7 +41,6 @@ div.wrapper(
include ../includes/modules/kanban-table
div.lightbox.lightbox-generic-form.lightbox-create-edit(tg-lb-create-edit)
include ../includes/modules/lightbox-create-edit/lb-create-edit-us
div.lightbox.lightbox-generic-bulk(tg-lb-create-bulk-userstories)
include ../includes/modules/lightbox-us-bulk

View File

@ -48,7 +48,6 @@ div.wrapper(
include ../includes/modules/taskboard-table
div.lightbox.lightbox-generic-form.lightbox-create-edit(tg-lb-create-edit)
include ../includes/modules/lightbox-create-edit/lb-create-edit-task
div.lightbox.lightbox-generic-bulk.lightbox-task-bulk(tg-lb-create-bulk-tasks)
include ../includes/modules/lightbox-task-bulk

View File

@ -6,8 +6,6 @@ $column-shrink: 0;
$column-margin: 0 $margin 0 0;
$column-padding: .5rem 1rem;
$issues-column-width: $column-width - $margin * 4;
@mixin fold {
.card {
align-self: flex-start;
@ -30,8 +28,8 @@ $issues-column-width: $column-width - $margin * 4;
}
}
}
&.task-column,
.task-column {
&.taskboard-column,
.taskboard-column {
align-content: flex-start;
display: flex;
flex-direction: column;
@ -125,7 +123,7 @@ $issues-column-width: $column-width - $margin * 4;
margin-bottom: 5rem;
overflow: auto;
width: 100%;
.task-column {
.taskboard-column {
flex-basis: $column-width;
flex-grow: $column-flex;
flex-shrink: $column-shrink;
@ -137,17 +135,6 @@ $issues-column-width: $column-width - $margin * 4;
}
}
.issues-cell {
display: flex;
flex-direction: row;
max-width: inherit;
width: 100%;
.card {
flex-basis: $issues-column-width;
flex-grow: $column-flex;
flex-shrink: 1;
}
}
.row-fold {
@include fold;
@ -155,25 +142,25 @@ $issues-column-width: $column-width - $margin * 4;
.column-fold {
@include fold;
}
.task-row {
.taskboard-row {
display: flex;
margin-bottom: .25rem;
min-height: 10rem;
width: 100%;
&.blocked {
.taskboard-userstory-box {
.taskboard-row-title-box {
background: rgba($red, .6);
}
.taskboard-userstory-box svg,
.taskboard-userstory-box svg:hover,
.taskboard-row-title-box svg,
.taskboard-row-title-box svg:hover,
.points-value,
.points-value:hover {
color: $white;
fill: $white;
transition: color .3s linear;
}
.taskboard-tasks-box {
.taskboard-cards-box {
background: rgba($red, .1);
}
}
@ -188,23 +175,36 @@ $issues-column-width: $column-width - $margin * 4;
display: none;
}
}
&.issues-row {
.taskboard-cards-box {
align-content: flex-start;
align-items: flex-start;
display: flex;
flex-wrap: wrap;
max-height: 400px;
width: 100%;
}
.card {
cursor: default;
height: auto;
}
}
&.issues-row:not(.row-fold) {
.taskboard-cards-box {
flex-direction: column;
}
.card {
width: 280px;
}
}
}
.issues-row {
display: flex;
margin-bottom: .25rem;
// margin-top: 1rem;
// border-top: 1rem solid;
// border-top-color: black;
min-height: 10rem;
width: auto;
}
.taskboard-userstory-box {
.taskboard-row-title-box {
padding: .5rem .5rem .5rem 1.5rem;
}
}
.taskboard-userstory-box {
.taskboard-row-title-box {
position: relative;
.us-title {
@include font-size(normal);

View File

@ -14,7 +14,7 @@ $column-padding: .5rem 1rem;
overflow: hidden;
width: 100%;
&.zoom-0 {
.task-column,
.taskboard-column,
.task-colum-name {
max-width: $column-width / 2;
}
@ -45,7 +45,7 @@ $column-padding: .5rem 1rem;
}
}
&.task-colum-name,
&.task-column {
&.taskboard-column {
flex-flow: 1;
max-width: $column-folded-width;
min-height: 2.5rem;
@ -129,7 +129,7 @@ $column-padding: .5rem 1rem;
overflow: hidden;
overflow-x: auto;
width: 100%;
.task-column {
.taskboard-column {
flex-basis: $column-width;
flex-grow: $column-flex;
flex-shrink: $column-shrink;

View File

@ -2,7 +2,7 @@
_:-ms-fullscreen,
:root .taskboard-table-body {
.task-row {
.taskboard-row {
min-height: auto;
}
}

View File

@ -273,7 +273,7 @@ tg-project-menu {
}
}
.taskboard-table-body {
.taskboard-tasks-box {
.taskboard-cards-box {
background: $white;
border: 1px solid $black;
}

View File

@ -160,7 +160,7 @@ tg-project-menu {
}
}
.taskboard-table-body {
.taskboard-tasks-box {
.taskboard-cards-box {
background: $mass-white;
}
}

View File

@ -140,7 +140,7 @@ tg-project-menu {
}
}
.taskboard-table-body {
.taskboard-tasks-box {
.taskboard-cards-box {
background: $mass-white;
}
}