Fixed show actions in sidebar.
This commit is contained in:
parent
fda6fa30f1
commit
1eb1a7e8f8
1 changed files with 22 additions and 19 deletions
|
@ -144,6 +144,8 @@ class App.TicketZoom extends App.Controller
|
||||||
|
|
||||||
# get data
|
# get data
|
||||||
@ticket = App.Ticket.fullLocal( @ticket_id )
|
@ticket = App.Ticket.fullLocal( @ticket_id )
|
||||||
|
@ticket.article = undefined
|
||||||
|
console.log('KLKL',@ticket)
|
||||||
|
|
||||||
# render page
|
# render page
|
||||||
@render(force)
|
@render(force)
|
||||||
|
@ -278,7 +280,7 @@ class App.TicketZoom extends App.Controller
|
||||||
]
|
]
|
||||||
filter: @form_meta.filter
|
filter: @form_meta.filter
|
||||||
params: defaults
|
params: defaults
|
||||||
bookmarkable: true
|
#bookmarkable: true
|
||||||
)
|
)
|
||||||
#console.log('Ichanges', modelDiff, task_state, ticket.attributes())
|
#console.log('Ichanges', modelDiff, task_state, ticket.attributes())
|
||||||
#@markFormDiff( modelDiff )
|
#@markFormDiff( modelDiff )
|
||||||
|
@ -323,25 +325,26 @@ class App.TicketZoom extends App.Controller
|
||||||
name: 'ticket'
|
name: 'ticket'
|
||||||
icon: 'message'
|
icon: 'message'
|
||||||
callback: editTicket
|
callback: editTicket
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
name: 'ticket-history'
|
|
||||||
title: 'History'
|
|
||||||
callback: showTicketHistory
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ticket-merge'
|
|
||||||
title: 'Merge'
|
|
||||||
callback: showTicketMerge
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Change Customer'
|
|
||||||
name: 'customer-change'
|
|
||||||
callback: changeCustomer
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
if !@isRole('Customer')
|
||||||
|
items[0]['actions'] = [
|
||||||
|
{
|
||||||
|
name: 'ticket-history'
|
||||||
|
title: 'History'
|
||||||
|
callback: showTicketHistory
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ticket-merge'
|
||||||
|
title: 'Merge'
|
||||||
|
callback: showTicketMerge
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Change Customer'
|
||||||
|
name: 'customer-change'
|
||||||
|
callback: changeCustomer
|
||||||
|
},
|
||||||
|
]
|
||||||
if !@isRole('Customer')
|
if !@isRole('Customer')
|
||||||
editCustomer = (e, el) =>
|
editCustomer = (e, el) =>
|
||||||
new App.ControllerGenericEdit(
|
new App.ControllerGenericEdit(
|
||||||
|
@ -573,7 +576,7 @@ class App.TicketZoom extends App.Controller
|
||||||
articleParams = @formParam( @$('.article-add') )
|
articleParams = @formParam( @$('.article-add') )
|
||||||
console.log "submit article", articleParams
|
console.log "submit article", articleParams
|
||||||
articleAttributes = App.TicketArticle.attributesGet( 'edit' )
|
articleAttributes = App.TicketArticle.attributesGet( 'edit' )
|
||||||
if articleParams['body'] || ( articleAttributes['body'] && articleAttributes['body']['null'] is false )
|
if articleParams['body'] #&& $( articleParams['body'] ).text()
|
||||||
articleParams.from = @Session.get().displayName()
|
articleParams.from = @Session.get().displayName()
|
||||||
articleParams.ticket_id = ticket.id
|
articleParams.ticket_id = ticket.id
|
||||||
articleParams.form_id = @form_id
|
articleParams.form_id = @form_id
|
||||||
|
|
Loading…
Reference in a new issue