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

This commit is contained in:
James Allen 2014-07-28 17:16:08 +01:00
commit 6d9072f0e2
5 changed files with 20 additions and 7 deletions

View file

@ -22,6 +22,14 @@ module.exports = HomeController =
else
res.redirect "/login"
home: (req, res)->
if homepageExists
res.render 'external/home',
title: 'ShareLaTeX.com'
else
res.redirect "/login"
externalPage: (page, title) ->
return (req, res, next = (error) ->) ->
path = Path.resolve(__dirname + "/../../../views/external/#{page}.jade")

View file

@ -3,7 +3,7 @@ HomeController = require('./HomeController')
module.exports =
apply: (app) ->
app.get '/', HomeController.index
app.get '/home', HomeController.index
app.get '/home', HomeController.home
app.get '/tos', HomeController.externalPage("tos", "Terms of Service")
app.get '/about', HomeController.externalPage("about", "About Us")

View file

@ -146,16 +146,16 @@ block content
input.form-control(
type="text",
placeholder="",
ng-model="deleteConfirmationText",
equals="DELETE",
focus-on="open"
ng-model="state.deleteText",
focus-on="open",
ng-keyup="checkValidation()"
)
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
) Cancel
button.btn.btn-danger(
ng-disabled="deleteAccountForm.$invalid || state.inflight"
ng-disabled="!state.isValid || state.inflight"
ng-click="delete()"
)
span(ng-hide="state.inflight") Delete

View file

@ -28,7 +28,9 @@ define [
App.controller "DeleteAccountModalController", [
"$scope", "$modalInstance", "$timeout", "$http",
($scope, $modalInstance, $timeout, $http) ->
$scope.state =
$scope.state =
isValid : false
deleteText: ""
inflight: false
$modalInstance.opened.then () ->
@ -36,6 +38,9 @@ define [
$scope.$broadcast "open"
, 700
$scope.checkValidation = ->
$scope.state.isValid = $scope.state.deleteText == "DELETE"
$scope.delete = () ->
$scope.state.inflight = true

View file

@ -49,7 +49,7 @@
//
//## Font, line-height, and color for body text, headings, and more.
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,600,700);
@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700);
@import url(//fonts.googleapis.com/css?family=PT+Serif:400,600,700);
@font-family-sans-serif: "Open Sans", sans-serif;