mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'master' of github.com:sharelatex/web-sharelatex
This commit is contained in:
commit
6f4c2a409c
1 changed files with 26 additions and 6 deletions
|
@ -42,38 +42,58 @@ define [
|
||||||
return attributes
|
return attributes
|
||||||
|
|
||||||
bindToRootDocId: ->
|
bindToRootDocId: ->
|
||||||
|
remoteChange = false
|
||||||
@on "change:rootDoc_id", (project, docId) =>
|
@on "change:rootDoc_id", (project, docId) =>
|
||||||
@get("ide").socket.emit "setRootDoc", docId
|
if !remoteChange
|
||||||
|
@get("ide").socket.emit "setRootDoc", docId
|
||||||
@get("ide").socket.on "rootDocUpdated", (docId) =>
|
@get("ide").socket.on "rootDocUpdated", (docId) =>
|
||||||
|
remoteChange = true
|
||||||
@set("rootDoc_id", docId)
|
@set("rootDoc_id", docId)
|
||||||
|
remoteChange = false
|
||||||
|
|
||||||
bindToProjectName: ->
|
bindToProjectName: ->
|
||||||
|
remoteChange = false
|
||||||
@on "change:name", (project, name) =>
|
@on "change:name", (project, name) =>
|
||||||
@get("ide").socket.emit "setProjectName", window.window_id, name
|
if !remoteChange
|
||||||
|
@get("ide").socket.emit "setProjectName", window.window_id, name
|
||||||
@get("ide").socket.on "projectNameUpdated", (senderWindowId, name) =>
|
@get("ide").socket.on "projectNameUpdated", (senderWindowId, name) =>
|
||||||
|
remoteChange = true
|
||||||
@set("name", name)
|
@set("name", name)
|
||||||
|
remoteChange = false
|
||||||
|
|
||||||
bindToCompiler: ->
|
bindToCompiler: ->
|
||||||
|
remoteChange = false
|
||||||
@on "change:compiler", (project, name) =>
|
@on "change:compiler", (project, name) =>
|
||||||
@get("ide").socket.emit "setCompiler", name
|
if !remoteChange
|
||||||
|
@get("ide").socket.emit "setCompiler", name
|
||||||
@get("ide").socket.on "compilerUpdated", (compiler) =>
|
@get("ide").socket.on "compilerUpdated", (compiler) =>
|
||||||
@set("compiler", compiler)
|
remoteChange = true
|
||||||
|
@set("compiler", compiler)
|
||||||
|
remoteChange = false
|
||||||
|
|
||||||
bindToSpellingPreference: ->
|
bindToSpellingPreference: ->
|
||||||
@on "change:spellCheckLanguage", (project, languageCode) =>
|
@on "change:spellCheckLanguage", (project, languageCode) =>
|
||||||
@get("ide").socket.emit "setSpellCheckLanguage", languageCode
|
@get("ide").socket.emit "setSpellCheckLanguage", languageCode
|
||||||
|
|
||||||
bindToPublicAccessLevel: ->
|
bindToPublicAccessLevel: ->
|
||||||
|
remoteChange = false
|
||||||
@on "change:publicAccesLevel", (project, level) =>
|
@on "change:publicAccesLevel", (project, level) =>
|
||||||
@get("ide").socket.emit "setPublicAccessLevel", level
|
if !remoteChange
|
||||||
|
@get("ide").socket.emit "setPublicAccessLevel", level
|
||||||
@get("ide").socket.on 'publicAccessLevelUpdated', (level) =>
|
@get("ide").socket.on 'publicAccessLevelUpdated', (level) =>
|
||||||
|
remoteChange = true
|
||||||
@set("publicAccesLevel", level)
|
@set("publicAccesLevel", level)
|
||||||
|
remoteChange = false
|
||||||
|
|
||||||
bindToProjectDescription: ->
|
bindToProjectDescription: ->
|
||||||
|
remoteChange = false
|
||||||
@on "change:description", (project, description) =>
|
@on "change:description", (project, description) =>
|
||||||
@get("ide").socket.emit "updateProjectDescription", description
|
if !remoteChange
|
||||||
|
@get("ide").socket.emit "updateProjectDescription", description
|
||||||
@get("ide").socket.on 'projectDescriptionUpdated', (description) =>
|
@get("ide").socket.on 'projectDescriptionUpdated', (description) =>
|
||||||
|
remoteChange = true
|
||||||
@set("description", description)
|
@set("description", description)
|
||||||
|
remoteChange = false
|
||||||
|
|
||||||
getRootDocumentsList: (callback) ->
|
getRootDocumentsList: (callback) ->
|
||||||
@get("ide").socket.emit "getRootDocumentsList", (err, listOfDocs) ->
|
@get("ide").socket.emit "getRootDocumentsList", (err, listOfDocs) ->
|
||||||
|
|
Loading…
Reference in a new issue