Fixed issue #931 - Template assigned to all new tickets tabs.
This commit is contained in:
parent
881fa18cbf
commit
b8ed5151fb
2 changed files with 3 additions and 7 deletions
|
@ -24,11 +24,6 @@ class App.TicketCreate extends App.Controller
|
|||
@buildScreen(params)
|
||||
@bindId = App.TicketCreateCollection.one(load)
|
||||
|
||||
# lisen if view need to be rerendered
|
||||
@bind 'ticket_create_rerender', (defaults) =>
|
||||
@log 'notice', 'error', defaults
|
||||
@render(defaults)
|
||||
|
||||
# rerender view, e. g. on langauge change
|
||||
@bind 'ui:rerender', =>
|
||||
return if !@authenticateCheck()
|
||||
|
@ -116,9 +111,11 @@ class App.TicketCreate extends App.Controller
|
|||
show: =>
|
||||
@navupdate "#ticket/create/id/#{@id}#{@split}", type: 'menu'
|
||||
@autosaveStart()
|
||||
@bind('ticket_create_rerender', (template) => @render(template))
|
||||
|
||||
hide: =>
|
||||
@autosaveStop()
|
||||
@unbind('ticket_create_rerender', (template) => @render(template))
|
||||
|
||||
changed: =>
|
||||
formCurrent = @formParam( @$('.ticket-create') )
|
||||
|
|
|
@ -83,11 +83,10 @@ class App.WidgetTemplate extends App.Controller
|
|||
e.preventDefault()
|
||||
|
||||
# get params
|
||||
form = @formParam($('.ticket-create'))
|
||||
form = @formParam($(e.target).closest('.content').find('.ticket-create'))
|
||||
params = @formParam(e.target)
|
||||
name = params['template_name']
|
||||
return if !name
|
||||
# delete params['template_name']
|
||||
|
||||
template = App.Template.findByAttribute('name', name)
|
||||
if !template
|
||||
|
|
Loading…
Reference in a new issue