mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'master' into pdfng
This commit is contained in:
commit
724116bcc1
2 changed files with 10 additions and 10 deletions
|
@ -22,24 +22,24 @@ define [
|
|||
|
||||
_buildCookieKey = (testName, bucket)->
|
||||
key = "sl_abt_#{testName}_#{bucket}"
|
||||
console.log key
|
||||
#console.log key
|
||||
return key
|
||||
|
||||
|
||||
_getTestCookie = (testName, bucket)->
|
||||
cookieKey = _buildCookieKey(testName, bucket)
|
||||
cookie = ipCookie(cookieKey)
|
||||
console.log cookieKey, cookie
|
||||
#console.log cookieKey, cookie
|
||||
return cookie
|
||||
|
||||
_persistCookieStep = (testName, bucket, newStep)->
|
||||
cookieKey = _buildCookieKey(testName, bucket)
|
||||
ipCookie(cookieKey, {step:newStep}, {expires:100, path:"/"})
|
||||
console.log("persisting", cookieKey, {step:newStep})
|
||||
#console.log("persisting", cookieKey, {step:newStep})
|
||||
ga('send', 'event', 'ab_tests', "#{testName}:#{bucket}", "step-#{newStep}")
|
||||
|
||||
_checkIfStepIsNext = (cookieStep, newStep)->
|
||||
console.log cookieStep, newStep, "checking if step is next"
|
||||
#console.log cookieStep, newStep, "checking if step is next"
|
||||
if !cookieStep? and newStep != 0
|
||||
return false
|
||||
else if newStep == 0
|
||||
|
|
|
@ -21,16 +21,12 @@ define [
|
|||
# Don't store myself
|
||||
continue
|
||||
# Store data in the same format returned by clientTracking.clientUpdated
|
||||
if user.first_name?.length == 0 and user.last_name.length == 0
|
||||
name = user.email
|
||||
else
|
||||
name = "#{user.first_name} #{user.last_name}"
|
||||
|
||||
@$scope.onlineUsers[user.client_id] = {
|
||||
id: user.client_id
|
||||
user_id: user.user_id
|
||||
email: user.email
|
||||
name: name
|
||||
name: "#{user.first_name} #{user.last_name}"
|
||||
doc_id: user.cursorData?.doc_id
|
||||
row: user.cursorData?.row
|
||||
column: user.cursorData?.column
|
||||
|
@ -57,8 +53,12 @@ define [
|
|||
for client_id, user of @$scope.onlineUsers
|
||||
if user.doc_id?
|
||||
user.doc = @ide.fileTreeManager.findEntityById(user.doc_id)
|
||||
|
||||
if user.name?.trim().length == 0
|
||||
user.name = user.email
|
||||
|
||||
@$scope.onlineUsersArray.push user
|
||||
|
||||
|
||||
@$scope.onlineUserCursorHighlights = {}
|
||||
for client_id, client of @$scope.onlineUsers
|
||||
doc_id = client.doc_id
|
||||
|
|
Loading…
Reference in a new issue