From ceff0d4abaf0a06a031a6a74f8ebf57a67a9fb7d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 17 Jun 2013 10:41:18 +0200 Subject: [PATCH] Renamed to taskbar_id. --- .../app/controllers/task_widget.js.coffee | 2 +- .../app/lib/app_post/task_manager.js.coffee | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/controllers/task_widget.js.coffee b/app/assets/javascripts/app/controllers/task_widget.js.coffee index f181e8077..86e2dc662 100644 --- a/app/assets/javascripts/app/controllers/task_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/task_widget.js.coffee @@ -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.' diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee index 8a36cf315..ce9273c06 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee @@ -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()