Improved autosave.
This commit is contained in:
parent
dd53ab616c
commit
5472a6b648
1 changed files with 4 additions and 7 deletions
|
@ -49,12 +49,6 @@ class App.TicketCreate extends App.Controller
|
||||||
@log 'notice', 'error', defaults
|
@log 'notice', 'error', defaults
|
||||||
@render(defaults)
|
@render(defaults)
|
||||||
|
|
||||||
# start auto save
|
|
||||||
@delay(
|
|
||||||
=> @autosave(),
|
|
||||||
5000
|
|
||||||
)
|
|
||||||
|
|
||||||
meta: =>
|
meta: =>
|
||||||
text = App.i18n.translateInline( @article_attributes['title'] )
|
text = App.i18n.translateInline( @article_attributes['title'] )
|
||||||
subject = @el.find('[name=subject]').val()
|
subject = @el.find('[name=subject]').val()
|
||||||
|
@ -91,7 +85,7 @@ class App.TicketCreate extends App.Controller
|
||||||
@autosaveLast = data
|
@autosaveLast = data
|
||||||
@log 'notice', 'form hash changed', diff, data
|
@log 'notice', 'form hash changed', diff, data
|
||||||
App.TaskManager.update( @task_key, { 'state': data })
|
App.TaskManager.update( @task_key, { 'state': data })
|
||||||
@interval( update, 10000, @id, @auto_save_key )
|
@interval( update, 3000, @id, @auto_save_key )
|
||||||
|
|
||||||
# get data / in case also ticket data for split
|
# get data / in case also ticket data for split
|
||||||
fetch: (params) ->
|
fetch: (params) ->
|
||||||
|
@ -211,6 +205,9 @@ class App.TicketCreate extends App.Controller
|
||||||
el: @el.find('.ticket-create').find('textarea')
|
el: @el.find('.ticket-create').find('textarea')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# start auto save
|
||||||
|
@autosave()
|
||||||
|
|
||||||
localUserInfo: (params) =>
|
localUserInfo: (params) =>
|
||||||
|
|
||||||
# update text module UI
|
# update text module UI
|
||||||
|
|
Loading…
Reference in a new issue