Merge branch 'master' of github.com:sharelatex/web-sharelatex

This commit is contained in:
Henry Oswald 2014-02-27 17:35:48 +00:00
commit aa0d26d5ab
14 changed files with 63 additions and 21 deletions

19
services/web/.travis.yml Normal file
View file

@ -0,0 +1,19 @@
language: node_js
node_js:
- "0.10"
before_install:
- npm install -g grunt-cli
install:
- npm install
- grunt install
script:
- grunt test:unit
services:
- redis-server
- mongodb

View file

@ -9,6 +9,11 @@ a lot of logic around creating and editing projects, and account management.
The rest of the ShareLaTeX stack, along with information about contributing can be found in the The rest of the ShareLaTeX stack, along with information about contributing can be found in the
[sharelatex/sharelatex](https://github.com/sharelatex/sharelatex) repository. [sharelatex/sharelatex](https://github.com/sharelatex/sharelatex) repository.
Unit test status
----------------
[![Unit test status](https://travis-ci.org/sharelatex/web-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/web-sharelatex)
License and Credits License and Credits
------------------- -------------------

View file

@ -170,6 +170,7 @@ module.exports =
metrics.inc "user.password-change" metrics.inc "user.password-change"
oldPass = req.body.currentPassword oldPass = req.body.currentPassword
AuthenticationManager.authenticate _id: req.session.user._id, oldPass, (err, user)-> AuthenticationManager.authenticate _id: req.session.user._id, oldPass, (err, user)->
return callback(err) if err?
if(user) if(user)
logger.log user: req.session.user, "changing password" logger.log user: req.session.user, "changing password"
newPassword1 = req.body.newPassword1 newPassword1 = req.body.newPassword1
@ -198,17 +199,20 @@ module.exports =
redirectUserToDropboxAuth: (req, res)-> redirectUserToDropboxAuth: (req, res)->
user_id = req.session.user._id user_id = req.session.user._id
dropboxHandler.getDropboxRegisterUrl user_id, (err, url)-> dropboxHandler.getDropboxRegisterUrl user_id, (err, url)->
return callback(err) if err?
logger.log url:url, "redirecting user for dropbox auth" logger.log url:url, "redirecting user for dropbox auth"
res.redirect url res.redirect url
completeDropboxRegistration: (req, res)-> completeDropboxRegistration: (req, res)->
user_id = req.session.user._id user_id = req.session.user._id
dropboxHandler.completeRegistration user_id, (err, success)-> dropboxHandler.completeRegistration user_id, (err, success)->
return callback(err) if err?
res.redirect('/user/settings#dropboxSettings') res.redirect('/user/settings#dropboxSettings')
unlinkDropbox: (req, res)-> unlinkDropbox: (req, res)->
user_id = req.session.user._id user_id = req.session.user._id
dropboxHandler.unlinkAccount user_id, (err, success)-> dropboxHandler.unlinkAccount user_id, (err, success)->
return callback(err) if err?
res.redirect('/user/settings#dropboxSettings') res.redirect('/user/settings#dropboxSettings')
deleteUser: (req, res)-> deleteUser: (req, res)->

View file

@ -26,9 +26,9 @@ UserSchema = new Schema
pdfViewer : {type : String, default: "pdfjs"} pdfViewer : {type : String, default: "pdfjs"}
} }
features : { features : {
collaborators: {type:Number, default:1} collaborators: { type:Number, default: Settings.defaultFeatures.collaborators }
versioning: {type:Boolean, default:false} versioning: { type:Boolean, default: Settings.defaultFeatures.versioning }
dropbox: {type:Boolean, default:false} dropbox: { type:Boolean, default: Settings.defaultFeatures.dropbox }
} }
featureSwitches : { featureSwitches : {
dropbox: {type:Boolean, default:true}, dropbox: {type:Boolean, default:true},

View file

@ -1,4 +1,8 @@
.row-fluid .row-fluid
.span12
div.alert.alert-success.open-source
| ShareLaTeX is open source.
a(href="https://github.com/sharelatex/sharelatex") Fork us on GitHub.
.span12 .span12
.small-footer .small-footer
ul ul

View file

@ -34,7 +34,7 @@ block content
.row .row
.span4.offset4.bonus-banner .span4.offset4.bonus-banner
.title .title
a(href='mailto:?subject=Online LaTeX editor you may like, &body=Hey, I have been using the online LaTeX editor ShareLaTeX recently and thought you might like to check it out. #{encodeURIComponent(buildReferalUrl("e"))}', title='Share by Email').email Email us to your friends a(href='mailto:?subject=Online LaTeX editor you may like &body=Hey, I have been using the online LaTeX editor ShareLaTeX recently and thought you might like to check it out. #{encodeURIComponent(buildReferalUrl("e"))}', title='Share by Email').email Email us to your friends
.row .row
.span4.offset4.bonus-banner .span4.offset4.bonus-banner

View file

@ -150,8 +150,8 @@ block content
mixin plan(plans.groupAnnualPlans[2], "", false) mixin plan(plans.groupAnnualPlans[2], "", false)
.tab-pane.student-pricing .tab-pane.student-pricing
include ../general/small-footer include ../general/small-footer
link(rel='stylesheet', href='/brand/plans.css?fingerprint='+fingerprint('/brand/mainStyle.css')) link(rel='stylesheet', href='/brand/plans.css?fingerprint='+fingerprint('/brand/mainStyle.css'))
script script
mixpanel.track("Page Viewed", { name: "plans" }) mixpanel.track("Page Viewed", { name: "plans" })

View file

@ -152,6 +152,8 @@ block content
p Every few months we send a news letter out summarizing the new features available, if you would prefer to not receive this email then you are free to unsubscribe below at any time p Every few months we send a news letter out summarizing the new features available, if you would prefer to not receive this email then you are free to unsubscribe below at any time
a#unsubscribeFromNewsletter.btn.btn-danger(data-csrf=csrfToken) Unsubscribe a#unsubscribeFromNewsletter.btn.btn-danger(data-csrf=csrfToken) Unsubscribe
include ../general/small-footer
#changePasswordModal(style='display: none') #changePasswordModal(style='display: none')
.modal .modal
form#changePasswordForm(method="post", action="/user/password/update") form#changePasswordForm(method="post", action="/user/password/update")

View file

@ -112,14 +112,16 @@ module.exports =
# #
# You can select the features that are enabled by default for new # You can select the features that are enabled by default for new
# new users. # new users.
defaultFeatures: defaultFeatures =
collaborators: -1
dropbox: true
versioning: true
plans: plans = [{ plans: plans = [{
planCode: "personal" planCode: "personal"
name: "Personal" name: "Personal"
price: 0 price: 0
features: features: defaultFeatures
collaborators: -1
dropbox: true
versioning: true
}] }]
# Spelling languages # Spelling languages

View file

@ -26,9 +26,9 @@
"mimelib": "~0.2.8", "mimelib": "~0.2.8",
"bufferedstream": "~1.4.1", "bufferedstream": "~1.4.1",
"mixpanel": "0.0.18", "mixpanel": "0.0.18",
"settings-sharelatex": "git+ssh://git@github.com:sharelatex/settings-sharelatex.git#master", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
"logger-sharelatex": "git+ssh://git@github.com:sharelatex/logger-sharelatex.git#master", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master",
"soa-req-id": "git+ssh://git@github.com:sharelatex/soa-req-id.git#master", "soa-req-id": "git+https://github.com/sharelatex/soa-req-id.git#master",
"fairy": "0.0.2", "fairy": "0.0.2",
"node-uuid": "~1.4.0", "node-uuid": "~1.4.0",
"mongojs": "0.9.8", "mongojs": "0.9.8",

View file

@ -141,6 +141,7 @@ define [
readOnly: true readOnly: true
aceEditor.commands.removeCommand "transposeletters" aceEditor.commands.removeCommand "transposeletters"
aceEditor.commands.removeCommand "showSettingsMenu" aceEditor.commands.removeCommand "showSettingsMenu"
aceEditor.commands.removeCommand "foldall"
aceEditor.showCommandLine = (args...) => aceEditor.showCommandLine = (args...) =>
@trigger "showCommandLine", aceEditor, args... @trigger "showCommandLine", aceEditor, args...

View file

@ -252,7 +252,7 @@ define [
@ide = @options.ide @ide = @options.ide
url: (medium) -> url: (medium) ->
"https://www.sharelatex.com/project/#{@ide.project.get("id")}" + "#{window.sharelatex.siteUrl}/project/#{@ide.project.get("id")}" +
"?r=#{@ide.user.get("referal_id")}&rs=ps&rm=#{medium}" # Referal source = public share "?r=#{@ide.user.get("referal_id")}&rs=ps&rm=#{medium}" # Referal source = public share
render: -> render: ->
@ -264,10 +264,10 @@ define [
url = "https://www.facebook.com/dialog/feed?link=#{encodeURIComponent(@url("fb"))}&" + url = "https://www.facebook.com/dialog/feed?link=#{encodeURIComponent(@url("fb"))}&" +
"app_id=148710621956179&" + "app_id=148710621956179&" +
"picture=https://www.sharelatex.com/brand/logo/logo-128.png&" + "picture=#{window.sharelatex.siteUrl}/brand/logo/logo-128.png&" +
"name=#{@ide.project.get("name")}&" + "name=#{@ide.project.get("name")}&" +
"caption=My LaTeX project (#{@ide.project.get("name")}) is available online on ShareLaTeX&" + "caption=My LaTeX project (#{@ide.project.get("name")}) is available online on ShareLaTeX&" +
"redirect_uri=http://www.sharelatex.com&" + "redirect_uri=#{window.sharelatex.siteUrl}&" +
"display=popup" "display=popup"
mixpanel?.track("Project Shared", { method: "facebook" }) mixpanel?.track("Project Shared", { method: "facebook" })
window.open( window.open(

View file

@ -299,7 +299,7 @@ body.editor {
.small { .small {
color: #666; color: #666;
margin-top: 6px; margin-top: 6px;
white-space: pre; white-space: pre-wrap;
} }
} }
#rawLogArea { #rawLogArea {

View file

@ -1,6 +1,11 @@
.open-source {
text-align: center;
width: 300px;
margin: auto;
margin-top: 6px;
}
.small-footer { .small-footer {
margin-top: 20px; margin-top: 12px;
margin-bottom: 20px; margin-bottom: 20px;
text-align:center; text-align:center;
font-size: 0.9em; font-size: 0.9em;