Merge branch 'private-issue907-link' into develop

This commit is contained in:
Martin Edenhofer 2017-03-31 16:18:52 +02:00
commit eb287c6b90

View file

@ -110,8 +110,8 @@ class App.LinkAdd extends App.ControllerModal
processData: true processData: true
success: (data, status, xhr) => success: (data, status, xhr) =>
App.Collection.loadAssets(data.assets) App.Collection.loadAssets(data.assets)
@ticket_ids_by_customer = data.ticket_ids_by_customer @ticketIdsByCustomer = data.ticket_ids_by_customer
@ticket_ids_recent_viewed = data.ticket_ids_recent_viewed @ticketIdsRecentViewed = data.ticket_ids_recent_viewed
@render() @render()
) )
@ -122,30 +122,26 @@ class App.LinkAdd extends App.ControllerModal
object: @object object: @object
)) ))
list = [] ticketIdsByCustomer = []
for ticket_id in @ticket_ids_by_customer for ticket_id in @ticketIdsByCustomer
if ticket_id isnt @ticket.id if ticket_id isnt @ticket.id
ticketItem = App.Ticket.fullLocal(ticket_id) ticketIdsByCustomer.push ticket_id
list.push ticketItem new App.TicketList(
new App.ControllerTable( tableId: 'ticket-merge-customer-tickets'
el: content.find('#ticket-merge-customer-tickets') el: content.find('#ticket-merge-customer-tickets')
overview: ['number', 'title', 'state', 'group', 'created_at'] ticket_ids: ticketIdsByCustomer
model: App.Ticket radio: true
objects: list
radio: true
) )
list = [] ticketIdsByRecentView = []
for ticket_id in @ticket_ids_recent_viewed for ticket_id in @ticketIdsRecentViewed
if ticket_id isnt @ticket.id if ticket_id isnt @ticket.id
ticketItem = App.Ticket.fullLocal( ticket_id ) ticketIdsByRecentView.push ticket_id
list.push ticketItem new App.TicketList(
new App.ControllerTable( tableId: 'ticket-merge-recent-tickets'
el: content.find('#ticket-merge-recent-tickets') el: content.find('#ticket-merge-recent-tickets')
overview: ['number', 'title', 'state', 'group', 'created_at'] ticket_ids: ticketIdsByRecentView
model: App.Ticket radio: true
objects: list
radio: true
) )
content.delegate('[name="ticket_number"]', 'focus', (e) -> content.delegate('[name="ticket_number"]', 'focus', (e) ->