replace invalid q.all.apply calls

stable
Juanfran 2014-12-02 09:39:05 +01:00
parent 3733a86920
commit 382091c726
3 changed files with 5 additions and 5 deletions

View File

@ -390,14 +390,14 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
# Rehash userstories order field
# and persist in bulk all changes.
promise = @q.all.apply(null, promises).then =>
promise = @q.all(promises).then =>
items = @.resortUserStories(newSprint.user_stories, "sprint_order")
data = @.prepareBulkUpdateData(items, "sprint_order")
return @rs.userstories.bulkUpdateSprintOrder(project, data).then =>
@rs.userstories.bulkUpdateSprintOrder(project, data).then =>
@rootscope.$broadcast("sprint:us:moved", us, oldSprintId, newSprintId)
return @rs.userstories.bulkUpdateBacklogOrder(project, data).then =>
@rs.userstories.bulkUpdateBacklogOrder(project, data).then =>
for us in usList
@rootscope.$broadcast("sprint:us:moved", us, oldSprintId, newSprintId)

View File

@ -62,7 +62,7 @@ class RepositoryService extends taiga.Service
saveAll: (models, patch=true) ->
promises = _.map(models, (x) => @.save(x, true))
return @q.all.apply(@q, promises)
return @q.all(promises)
save: (model, patch=true) ->
defered = @q.defer()

View File

@ -86,7 +86,7 @@ class AttachmentsController extends taiga.Controller
# Create attachments in bulk
createAttachments: (attachments) ->
promises = _.map(attachments, (x) => @._createAttachment(x))
return @q.all.apply(null, promises).then =>
return @q.all(promises).then =>
@.updateCounters()
# Add uploading attachment tracking.