Renamed to taskbar_id.

This commit is contained in:
Martin Edenhofer 2013-06-17 10:41:18 +02:00
parent c52ab26d5f
commit ceff0d4aba
2 changed files with 8 additions and 8 deletions

View file

@ -37,7 +37,7 @@ class App.TaskWidget extends App.Controller
if !@error
# only if new client id isnt own client id
if data.client_id isnt App.TaskManager.clientId()
if data.taskbar_id isnt App.TaskManager.TaskbarId()
@error = new App.SessionReloadModal(
title: 'Session'
message: 'Session taken over... please reload page or work with other browser window.'

View file

@ -54,10 +54,10 @@ class App.TaskManager
_instance ?= new _Singleton
_instance.workerAll()
@clientId: ->
@TaskbarId: ->
if _instance == undefined
_instance ?= new _Singleton
_instance.clientId()
_instance.TaskbarId()
class _Singleton extends App.Controller
@include App.Log
@ -247,10 +247,10 @@ class _Singleton extends App.Controller
App.Taskbar.deleteAll()
App.Event.trigger 'task:render'
clientId: =>
if !@clientIdInt
@clientIdInt = Math.floor( Math.random() * 99999999 )
@clientIdInt
TaskbarId: =>
if !@TaskbarIdInt
@TaskbarIdInt = Math.floor( Math.random() * 99999999 )
@TaskbarIdInt
tasksInitial: =>
# reopen tasks
@ -266,7 +266,7 @@ class _Singleton extends App.Controller
data:
recipient:
user_id: [ App.Session.get( 'id' ) ]
client_id: @clientId()
taskbar_id: @TaskbarId()
)
# App.Taskbar.fetch()