Add some confirm messages
parent
1946d25e87
commit
866c576e9e
|
@ -117,11 +117,13 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
||||||
@scope.$on "usform:bulk:success", =>
|
@scope.$on "usform:bulk:success", =>
|
||||||
@.loadUserstories(true)
|
@.loadUserstories(true)
|
||||||
@.loadProjectStats()
|
@.loadProjectStats()
|
||||||
|
@confirm.notify("success")
|
||||||
@analytics.trackEvent("userstory", "create", "bulk create userstory on backlog", 1)
|
@analytics.trackEvent("userstory", "create", "bulk create userstory on backlog", 1)
|
||||||
|
|
||||||
@scope.$on "sprintform:create:success", =>
|
@scope.$on "sprintform:create:success", =>
|
||||||
@.loadSprints()
|
@.loadSprints()
|
||||||
@.loadProjectStats()
|
@.loadProjectStats()
|
||||||
|
@confirm.notify("success")
|
||||||
@analytics.trackEvent("sprint", "create", "create sprint on backlog", 1)
|
@analytics.trackEvent("sprint", "create", "create sprint on backlog", 1)
|
||||||
|
|
||||||
@scope.$on "usform:new:success", =>
|
@scope.$on "usform:new:success", =>
|
||||||
|
@ -129,6 +131,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
||||||
@.loadProjectStats()
|
@.loadProjectStats()
|
||||||
|
|
||||||
@rootscope.$broadcast("filters:update")
|
@rootscope.$broadcast("filters:update")
|
||||||
|
@confirm.notify("success")
|
||||||
@analytics.trackEvent("userstory", "create", "create userstory on backlog", 1)
|
@analytics.trackEvent("userstory", "create", "create userstory on backlog", 1)
|
||||||
|
|
||||||
@scope.$on "sprintform:edit:success", =>
|
@scope.$on "sprintform:edit:success", =>
|
||||||
|
@ -331,14 +334,15 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
||||||
return _.map(uses, (x) -> {"us_id": x.id, "order": x[field]})
|
return _.map(uses, (x) -> {"us_id": x.id, "order": x[field]})
|
||||||
|
|
||||||
# --move us api behavior--
|
# --move us api behavior--
|
||||||
# if your are moving multiples USs you must use the bulk api
|
# If your are moving multiples USs you must use the bulk api
|
||||||
# if there is only one US you must use patch (repo.save)
|
# If there is only one US you must use patch (repo.save)
|
||||||
# the new US position is the position of the previous US + 1
|
#
|
||||||
# if the previous US has a position value that it is equal to
|
# The new US position is the position of the previous US + 1.
|
||||||
|
# If the previous US has a position value that it is equal to
|
||||||
# other USs, you must send all the USs with that position value
|
# other USs, you must send all the USs with that position value
|
||||||
# only if they are before of the target position with this USs
|
# only if they are before of the target position with this USs
|
||||||
# if it's a patch you must add them to the header, if is a bulk
|
# if it's a patch you must add them to the header, if is a bulk
|
||||||
# you must send them with the other USs.
|
# you must send them with the other USs
|
||||||
moveUs: (ctx, usList, newUsIndex, newSprintId) ->
|
moveUs: (ctx, usList, newUsIndex, newSprintId) ->
|
||||||
oldSprintId = usList[0].milestone
|
oldSprintId = usList[0].milestone
|
||||||
project = usList[0].project
|
project = usList[0].project
|
||||||
|
@ -408,17 +412,18 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
||||||
else if previous
|
else if previous
|
||||||
startIndex = orderList[previous.id] + 1
|
startIndex = orderList[previous.id] + 1
|
||||||
|
|
||||||
previousWithTheSameOrder = _.filter beforeDestination, (it) ->
|
previousWithTheSameOrder = _.filter(beforeDestination, (it) ->
|
||||||
return it[orderField] == orderList[previous.id]
|
it[orderField] == orderList[previous.id]
|
||||||
|
)
|
||||||
|
|
||||||
# we must send the USs previous to the dropped USs to
|
# we must send the USs previous to the dropped USs to tell the backend
|
||||||
# tell the backend which USs are before the dropped
|
# which USs are before the dropped USs, if they have the same value to
|
||||||
# USs, if they have the same value to order, the backend
|
# order, the backend doens't know after which one do you want to drop
|
||||||
# doens't know after which one do you want to drop
|
|
||||||
# the USs
|
# the USs
|
||||||
if previousWithTheSameOrder.length > 1
|
if previousWithTheSameOrder.length > 1
|
||||||
setPreviousOrders = _.map previousWithTheSameOrder, (it) ->
|
setPreviousOrders = _.map(previousWithTheSameOrder, (it) ->
|
||||||
return {us_id: it.id, order: orderList[it.id]}
|
{us_id: it.id, order: orderList[it.id]}
|
||||||
|
)
|
||||||
|
|
||||||
modifiedUs = []
|
modifiedUs = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue