mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'master' of github.com:sharelatex/web-sharelatex
This commit is contained in:
commit
6d9072f0e2
5 changed files with 20 additions and 7 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue