Preparing base for drag n drop in taskboard

stable
Alejandro Alonso 2014-07-01 12:30:25 +02:00
parent 96516106d9
commit 323149fa67
2 changed files with 22 additions and 1 deletions

View File

@ -446,6 +446,7 @@ BacklogSprintDirective = ($repo) ->
itemScope.$destroy() itemScope.$destroy()
dom = $el.find(".sprint-table") dom = $el.find(".sprint-table")
sortable = new Sortable(dom[0], { sortable = new Sortable(dom[0], {
group: "backlog", group: "backlog",
selector: ".milestone-us-item-row", selector: ".milestone-us-item-row",

View File

@ -24,6 +24,7 @@ toggleText = @.taiga.toggleText
mixOf = @.taiga.mixOf mixOf = @.taiga.mixOf
groupBy = @.taiga.groupBy groupBy = @.taiga.groupBy
bindOnce = @.taiga.bindOnce bindOnce = @.taiga.bindOnce
scopeDefer = @.taiga.scopeDefer
module = angular.module("taigaTaskboard") module = angular.module("taigaTaskboard")
@ -158,7 +159,26 @@ TaskboardDirective = ($rootscope) ->
######################### #########################
linkSortable = ($scope, $el, $attrs, $ctrl) -> linkSortable = ($scope, $el, $attrs, $ctrl) ->
console.log "TaskboardDirective.linkSortable" #TODO onUpdateItem = (event) ->
#TODO
console.log "onUpdate", event
onAddItem = (event) ->
#TODO
console.log "onAddItem", event
onRemoveItem = (event) ->
#TODO
console.log "onRemoveItem", event
dom = $el.find(".taskboard-table-body")
sortable = new Sortable(dom[0], {
group: "taskboard",
selector: ".taskboard-task",
onUpdate: onUpdateItem
onAdd: onAddItem
onRemove: onRemoveItem
})
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
$ctrl = $el.controller() $ctrl = $el.controller()