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
|
||||
@render(defaults)
|
||||
|
||||
# start auto save
|
||||
@delay(
|
||||
=> @autosave(),
|
||||
5000
|
||||
)
|
||||
|
||||
meta: =>
|
||||
text = App.i18n.translateInline( @article_attributes['title'] )
|
||||
subject = @el.find('[name=subject]').val()
|
||||
|
@ -91,7 +85,7 @@ class App.TicketCreate extends App.Controller
|
|||
@autosaveLast = data
|
||||
@log 'notice', 'form hash changed', diff, 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
|
||||
fetch: (params) ->
|
||||
|
@ -211,6 +205,9 @@ class App.TicketCreate extends App.Controller
|
|||
el: @el.find('.ticket-create').find('textarea')
|
||||
)
|
||||
|
||||
# start auto save
|
||||
@autosave()
|
||||
|
||||
localUserInfo: (params) =>
|
||||
|
||||
# update text module UI
|
||||
|
|
Loading…
Reference in a new issue