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

View file

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