Fixes #3807 - Remove changes of 05a471f90d
because they are not working as expected.
This commit is contained in:
parent
d4dfd750b7
commit
de9bb8bda9
2 changed files with 9 additions and 36 deletions
|
@ -206,22 +206,13 @@ class App.TicketOverview extends App.Controller
|
|||
article: article
|
||||
)
|
||||
ticket.article = article
|
||||
ticket.ajax().update(
|
||||
ticket.attributes()
|
||||
# this option will prevent callbacks and invalid data states in case of an error
|
||||
failResponseNoTrigger: true
|
||||
ticket.save(
|
||||
done: (r) =>
|
||||
@batchCountIndex++
|
||||
|
||||
# refresh view after all tickets are proceeded
|
||||
if @batchCountIndex == @batchCount
|
||||
App.Event.trigger('overview:fetch')
|
||||
fail: (record, settings, details) ->
|
||||
console.log('record, settings, details', record, settings, details)
|
||||
App.Event.trigger('notify', {
|
||||
type: 'error'
|
||||
msg: App.i18n.translateContent('Bulk action stopped %s!', error)
|
||||
})
|
||||
)
|
||||
return
|
||||
|
||||
|
@ -234,21 +225,13 @@ class App.TicketOverview extends App.Controller
|
|||
ticket.owner_id = id
|
||||
if !_.isEmpty(groupId)
|
||||
ticket.group_id = groupId
|
||||
ticket.ajax().update(
|
||||
ticket.attributes()
|
||||
# this option will prevent callbacks and invalid data states in case of an error
|
||||
failResponseNoTrigger: true
|
||||
ticket.save(
|
||||
done: (r) =>
|
||||
@batchCountIndex++
|
||||
|
||||
# refresh view after all tickets are proceeded
|
||||
if @batchCountIndex == @batchCount
|
||||
App.Event.trigger('overview:fetch')
|
||||
fail: (record, settings, details) ->
|
||||
App.Event.trigger('notify', {
|
||||
type: 'error'
|
||||
msg: App.i18n.translateContent('Bulk action stopped %s!', settings.error)
|
||||
})
|
||||
)
|
||||
return
|
||||
|
||||
|
@ -259,21 +242,13 @@ class App.TicketOverview extends App.Controller
|
|||
#console.log "perform action #{action} with id #{id} on ", $(item).val()
|
||||
ticket = App.Ticket.find($(item).val())
|
||||
ticket.group_id = id
|
||||
ticket.ajax().update(
|
||||
ticket.attributes()
|
||||
# this option will prevent callbacks and invalid data states in case of an error
|
||||
failResponseNoTrigger: true
|
||||
ticket.save(
|
||||
done: (r) =>
|
||||
@batchCountIndex++
|
||||
|
||||
# refresh view after all tickets are proceeded
|
||||
if @batchCountIndex == @batchCount
|
||||
App.Event.trigger('overview:fetch')
|
||||
fail: (record, settings, details) ->
|
||||
App.Event.trigger('notify', {
|
||||
type: 'error'
|
||||
msg: App.i18n.translateContent('Bulk action stopped %s!', error)
|
||||
})
|
||||
)
|
||||
return
|
||||
|
||||
|
|
|
@ -234,7 +234,6 @@ class Singleton extends Base
|
|||
|
||||
failResponse: (options) =>
|
||||
(xhr, statusText, error, settings) =>
|
||||
if options.failResponseNoTrigger isnt true
|
||||
switch settings.type
|
||||
when 'POST' then @createFailed()
|
||||
when 'DELETE' then @destroyFailed()
|
||||
|
@ -247,7 +246,6 @@ class Singleton extends Base
|
|||
details = JSON.parse(detailsRaw)
|
||||
options.fail?.call(@record, settings, details)
|
||||
|
||||
if options.failResponseNoTrigger isnt true
|
||||
@record.trigger('destroy', @record)
|
||||
# /add errors to calllback
|
||||
|
||||
|
|
Loading…
Reference in a new issue