Do not log show ticket again. Only once.

This commit is contained in:
Martin Edenhofer 2013-03-10 17:45:14 +01:00
parent 4b920bce15
commit 1c3fd7f38b
2 changed files with 7 additions and 3 deletions

View file

@ -26,13 +26,14 @@ class Index extends App.Controller
@article_id = params.article_id @article_id = params.article_id
@signature = undefined @signature = undefined
@signature_used = undefined @signature_used = undefined
@doNotLog = 0
@key = 'ticket::' + @ticket_id @key = 'ticket::' + @ticket_id
cache = App.Store.get( @key ) cache = App.Store.get( @key )
if cache if cache
@load(cache) @load(cache)
update = => update = =>
@fetch(@ticket_id) @fetch( @ticket_id, false)
@interval( update, 30000, 'zoom_check' ) @interval( update, 30000, 'zoom_check' )
fetch: (ticket_id, force) -> fetch: (ticket_id, force) ->
@ -41,7 +42,7 @@ class Index extends App.Controller
App.Com.ajax( App.Com.ajax(
id: 'ticket_zoom' id: 'ticket_zoom'
type: 'GET' type: 'GET'
url: 'api/ticket_full/' + ticket_id url: 'api/ticket_full/' + ticket_id + '?do_not_log=' + @doNotLog
data: data:
view: @view view: @view
processData: true processData: true
@ -62,6 +63,7 @@ class Index extends App.Controller
@load(data) @load(data)
App.Store.write( @key, data ) App.Store.write( @key, data )
) )
@doNotLog = 1
load: (data) => load: (data) =>
# reset old indexes # reset old indexes

View file

@ -300,7 +300,9 @@ class TicketsController < ApplicationController
end end
# log object as viewed # log object as viewed
if !params[:do_not_log]
log_view( ticket ) log_view( ticket )
end
# get signature # get signature
signature = {} signature = {}