Fixed reload of content on own change.
This commit is contained in:
parent
417657e9c8
commit
d5271f8244
1 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ class Index extends App.Controller
|
||||||
@fetch(@ticket_id)
|
@fetch(@ticket_id)
|
||||||
@interval( update, 30000, 'zoom_check' )
|
@interval( update, 30000, 'zoom_check' )
|
||||||
|
|
||||||
fetch: (ticket_id) ->
|
fetch: (ticket_id, force) ->
|
||||||
|
|
||||||
# get data
|
# get data
|
||||||
App.Com.ajax(
|
App.Com.ajax(
|
||||||
|
@ -46,7 +46,7 @@ class Index extends App.Controller
|
||||||
view: @view
|
view: @view
|
||||||
processData: true
|
processData: true
|
||||||
success: (data, status, xhr) =>
|
success: (data, status, xhr) =>
|
||||||
if @dataLastCall
|
if @dataLastCall && !force
|
||||||
return if _.isEqual( @dataLastCall.ticket, data.ticket)
|
return if _.isEqual( @dataLastCall.ticket, data.ticket)
|
||||||
diff = difference( @dataLastCall.ticket, data.ticket )
|
diff = difference( @dataLastCall.ticket, data.ticket )
|
||||||
console.log('diff', diff)
|
console.log('diff', diff)
|
||||||
|
@ -439,12 +439,12 @@ class Index extends App.Controller
|
||||||
@log 'TicketZoom', 'error', 'update article', errors
|
@log 'TicketZoom', 'error', 'update article', errors
|
||||||
article.save(
|
article.save(
|
||||||
success: (r) =>
|
success: (r) =>
|
||||||
@fetch(@ticket.id)
|
@fetch( @ticket.id, true )
|
||||||
error: (r) =>
|
error: (r) =>
|
||||||
@log 'TicketZoom', 'error', 'update article', r
|
@log 'TicketZoom', 'error', 'update article', r
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@fetch(@ticket.id)
|
@fetch( @ticket.id, true )
|
||||||
)
|
)
|
||||||
|
|
||||||
# errors = article.validate()
|
# errors = article.validate()
|
||||||
|
|
Loading…
Reference in a new issue