diff --git a/services/web/app/coffee/Features/StaticPages/HomeController.coffee b/services/web/app/coffee/Features/StaticPages/HomeController.coffee index 01224e88ef..ab60616d3e 100755 --- a/services/web/app/coffee/Features/StaticPages/HomeController.coffee +++ b/services/web/app/coffee/Features/StaticPages/HomeController.coffee @@ -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") diff --git a/services/web/app/coffee/Features/StaticPages/StaticPagesRouter.coffee b/services/web/app/coffee/Features/StaticPages/StaticPagesRouter.coffee index 788b74d389..ab4d7579b7 100644 --- a/services/web/app/coffee/Features/StaticPages/StaticPagesRouter.coffee +++ b/services/web/app/coffee/Features/StaticPages/StaticPagesRouter.coffee @@ -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") diff --git a/services/web/app/views/user/settings.jade b/services/web/app/views/user/settings.jade index c30a377713..ef23470149 100644 --- a/services/web/app/views/user/settings.jade +++ b/services/web/app/views/user/settings.jade @@ -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 diff --git a/services/web/public/coffee/main/account-settings.coffee b/services/web/public/coffee/main/account-settings.coffee index 29cd18e3c5..34b92883b0 100644 --- a/services/web/public/coffee/main/account-settings.coffee +++ b/services/web/public/coffee/main/account-settings.coffee @@ -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 diff --git a/services/web/public/stylesheets/core/variables.less b/services/web/public/stylesheets/core/variables.less index c4c4d79bd8..d753228e8c 100755 --- a/services/web/public/stylesheets/core/variables.less +++ b/services/web/public/stylesheets/core/variables.less @@ -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;