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)
|
@buildScreen(params)
|
||||||
@bindId = App.TicketCreateCollection.one(load)
|
@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
|
# rerender view, e. g. on langauge change
|
||||||
@bind 'ui:rerender', =>
|
@bind 'ui:rerender', =>
|
||||||
return if !@authenticateCheck()
|
return if !@authenticateCheck()
|
||||||
|
@ -116,9 +111,11 @@ class App.TicketCreate extends App.Controller
|
||||||
show: =>
|
show: =>
|
||||||
@navupdate "#ticket/create/id/#{@id}#{@split}", type: 'menu'
|
@navupdate "#ticket/create/id/#{@id}#{@split}", type: 'menu'
|
||||||
@autosaveStart()
|
@autosaveStart()
|
||||||
|
@bind('ticket_create_rerender', (template) => @render(template))
|
||||||
|
|
||||||
hide: =>
|
hide: =>
|
||||||
@autosaveStop()
|
@autosaveStop()
|
||||||
|
@unbind('ticket_create_rerender', (template) => @render(template))
|
||||||
|
|
||||||
changed: =>
|
changed: =>
|
||||||
formCurrent = @formParam( @$('.ticket-create') )
|
formCurrent = @formParam( @$('.ticket-create') )
|
||||||
|
|
|
@ -83,11 +83,10 @@ class App.WidgetTemplate extends App.Controller
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
# get params
|
# get params
|
||||||
form = @formParam($('.ticket-create'))
|
form = @formParam($(e.target).closest('.content').find('.ticket-create'))
|
||||||
params = @formParam(e.target)
|
params = @formParam(e.target)
|
||||||
name = params['template_name']
|
name = params['template_name']
|
||||||
return if !name
|
return if !name
|
||||||
# delete params['template_name']
|
|
||||||
|
|
||||||
template = App.Template.findByAttribute('name', name)
|
template = App.Template.findByAttribute('name', name)
|
||||||
if !template
|
if !template
|
||||||
|
|
Loading…
Reference in a new issue