Improved handling of autosave.
This commit is contained in:
parent
12d1da4b65
commit
a938618228
1 changed files with 7 additions and 2 deletions
|
@ -555,6 +555,9 @@ class App.TicketZoom extends App.Controller
|
||||||
# disable form
|
# disable form
|
||||||
@formDisable(e)
|
@formDisable(e)
|
||||||
|
|
||||||
|
# stop autosave
|
||||||
|
@autosaveStop()
|
||||||
|
|
||||||
# validate ticket
|
# validate ticket
|
||||||
errors = ticket.validate(
|
errors = ticket.validate(
|
||||||
screen: 'edit'
|
screen: 'edit'
|
||||||
|
@ -567,7 +570,7 @@ class App.TicketZoom extends App.Controller
|
||||||
screen: 'edit'
|
screen: 'edit'
|
||||||
)
|
)
|
||||||
@formEnable(e)
|
@formEnable(e)
|
||||||
#@autosaveStart()
|
@autosaveStart()
|
||||||
return
|
return
|
||||||
|
|
||||||
console.log('ticket validateion ok')
|
console.log('ticket validateion ok')
|
||||||
|
@ -606,11 +609,13 @@ class App.TicketZoom extends App.Controller
|
||||||
# check if recipient exists
|
# check if recipient exists
|
||||||
if !articleParams['to'] && !articleParams['cc']
|
if !articleParams['to'] && !articleParams['cc']
|
||||||
alert( App.i18n.translateContent('Need recipient in "To" or "Cc".') )
|
alert( App.i18n.translateContent('Need recipient in "To" or "Cc".') )
|
||||||
|
@autosaveStart()
|
||||||
return
|
return
|
||||||
|
|
||||||
# check if message exists
|
# check if message exists
|
||||||
if !articleParams['body']
|
if !articleParams['body']
|
||||||
alert( App.i18n.translateContent('Text needed') )
|
alert( App.i18n.translateContent('Text needed') )
|
||||||
|
@autosaveStart()
|
||||||
return
|
return
|
||||||
|
|
||||||
# check attachment
|
# check attachment
|
||||||
|
@ -619,7 +624,7 @@ class App.TicketZoom extends App.Controller
|
||||||
attachmentTranslatedRegExp = new RegExp( attachmentTranslated, 'i' )
|
attachmentTranslatedRegExp = new RegExp( attachmentTranslated, 'i' )
|
||||||
if articleParams['body'].match(/attachment/i) || articleParams['body'].match( attachmentTranslatedRegExp )
|
if articleParams['body'].match(/attachment/i) || articleParams['body'].match( attachmentTranslatedRegExp )
|
||||||
if !confirm( App.i18n.translateContent('You use attachment in text but no attachment is attached. Do you want to continue?') )
|
if !confirm( App.i18n.translateContent('You use attachment in text but no attachment is attached. Do you want to continue?') )
|
||||||
#@autosaveStart()
|
@autosaveStart()
|
||||||
return
|
return
|
||||||
|
|
||||||
console.log "article load", articleParams
|
console.log "article load", articleParams
|
||||||
|
|
Loading…
Reference in a new issue