Removed not needed debug logging.
This commit is contained in:
parent
d2306dc7fb
commit
5d4c4db4d3
1 changed files with 7 additions and 6 deletions
|
@ -365,15 +365,16 @@ class App.TicketZoom extends App.Controller
|
||||||
@autosaveLast = @taskGet()
|
@autosaveLast = @taskGet()
|
||||||
update = =>
|
update = =>
|
||||||
#console.log('AR', @formParam( @el.find('.article-add') ) )
|
#console.log('AR', @formParam( @el.find('.article-add') ) )
|
||||||
|
currentStoreTicket = @ticket.attributes()
|
||||||
|
delete currentStoreTicket.article
|
||||||
currentStore =
|
currentStore =
|
||||||
ticket: @ticket.attributes()
|
ticket: currentStoreTicket
|
||||||
article: {
|
article:
|
||||||
to: ''
|
to: ''
|
||||||
cc: ''
|
cc: ''
|
||||||
type: 'note'
|
type: 'note'
|
||||||
body: ''
|
body: ''
|
||||||
internal: ''
|
internal: ''
|
||||||
}
|
|
||||||
currentParams =
|
currentParams =
|
||||||
ticket: @formParam( @el.find('.edit') )
|
ticket: @formParam( @el.find('.edit') )
|
||||||
article: @formParam( @el.find('.article-add') )
|
article: @formParam( @el.find('.article-add') )
|
||||||
|
@ -390,13 +391,13 @@ class App.TicketZoom extends App.Controller
|
||||||
# get diff of last save
|
# get diff of last save
|
||||||
changedBetweenLastSave = _.isEqual(currentParams, @autosaveLast )
|
changedBetweenLastSave = _.isEqual(currentParams, @autosaveLast )
|
||||||
if !changedBetweenLastSave
|
if !changedBetweenLastSave
|
||||||
console.log('model DIFF ', modelDiff)
|
#console.log('model DIFF ', modelDiff)
|
||||||
|
|
||||||
@autosaveLast = clone(currentParams)
|
@autosaveLast = clone(currentParams)
|
||||||
@markFormDiff( modelDiff )
|
@markFormDiff( modelDiff )
|
||||||
|
|
||||||
@taskUpdateAll( modelDiff )
|
@taskUpdateAll( modelDiff )
|
||||||
@interval( update, 3000, 'autosave' )
|
@interval( update, 4000, 'autosave' )
|
||||||
|
|
||||||
markFormDiff: (diff = {}) =>
|
markFormDiff: (diff = {}) =>
|
||||||
ticketForm = @$('.edit')
|
ticketForm = @$('.edit')
|
||||||
|
@ -407,7 +408,7 @@ class App.TicketZoom extends App.Controller
|
||||||
params = {}
|
params = {}
|
||||||
params.ticket = @formParam( ticketForm )
|
params.ticket = @formParam( ticketForm )
|
||||||
params.article = @formParam( articleForm )
|
params.article = @formParam( articleForm )
|
||||||
console.log('markFormDiff', diff, params)
|
#console.log('markFormDiff', diff, params)
|
||||||
|
|
||||||
# clear all changes
|
# clear all changes
|
||||||
if _.isEmpty(diff.ticket) && _.isEmpty(diff.article)
|
if _.isEmpty(diff.ticket) && _.isEmpty(diff.article)
|
||||||
|
|
Loading…
Reference in a new issue