Make track changes a feature flag

This commit is contained in:
James Allen 2014-03-13 13:58:57 +00:00
parent 7aab6c4c0b
commit 81fcafb476
3 changed files with 5 additions and 6 deletions

View file

@ -120,7 +120,7 @@ module.exports = class ProjectController
allowed: true
featureSwitches:
dropbox: false
longPolling: false
trackChanges: false
else
anonymous = false
SubscriptionLocator.getUsersSubscription user._id, (err, subscription)->
@ -154,7 +154,7 @@ module.exports = class ProjectController
spellCheckLanguage: user.ace.spellCheckLanguage
pdfViewer : user.ace.pdfViewer
docPositions: {}
longPolling: user.featureSwitches.longPolling
trackChanges: user.featureSwitches.trackChanges
})
sharelatexObject : JSON.stringify({
siteUrl: Settings.siteUrl,

View file

@ -32,7 +32,7 @@ UserSchema = new Schema
}
featureSwitches : {
dropbox: {type:Boolean, default:true},
longPolling: {type:Boolean, default:false}
trackChanges: {type:Boolean, default:false}
}
referal_id : {type:String, default:() -> uuid.v4().split("-")[0]}
refered_users: [ type:ObjectId, ref:'User' ]

View file

@ -97,8 +97,6 @@ define [
ioOptions =
reconnect: false
"force new connection": true
if @userSettings.longPolling
ioOptions.transports = ["xhr-polling"]
@socket = socket = io.connect null, ioOptions
@messageManager = new MessageManager(@)
@ -119,7 +117,8 @@ define [
@cursorManager = new CursorManager(@)
@fileViewManager = new FileViewManager(@)
@analyticsManager = new AnalyticsManager(@)
@trackChangesManager = new TrackChangesManager(@)
if @userSettings.trackChanges
@trackChangesManager = new TrackChangesManager(@)
@setLoadingMessage("Connecting")
firstConnect = true