Commit dd71074e64ccb9ea8c19b0644a993dbdb32e2d50
1 parent
aff4dafcf4
Exists in
master
and in
1 other branch
cleaned up css; added wildcard to url routing for resetpassword;
Showing 4 changed files with 10 additions and 38 deletions Inline Diff
config.js
View file @
dd71074
angular.module('flashy', [ | 1 | 1 | angular.module('flashy', [ | |
'flashy.LogoutController', | 2 | 2 | 'flashy.LogoutController', | |
'flashy.LoginController', | 3 | 3 | 'flashy.LoginController', | |
'flashy.RootController', | 4 | 4 | 'flashy.RootController', | |
'flashy.FeedController', | 5 | 5 | 'flashy.FeedController', | |
'flashy.DeckController', | 6 | 6 | 'flashy.DeckController', | |
'flashy.ClassAddController', | 7 | 7 | 'flashy.ClassAddController', | |
'flashy.RequestResetController', | 8 | 8 | 'flashy.RequestResetController', | |
'flashy.ReviewController', | 9 | 9 | 'flashy.ReviewController', | |
'flashy.UserService', | 10 | 10 | 'flashy.UserService', | |
'flashy.FlashcardDirective', | 11 | 11 | 'flashy.FlashcardDirective', | |
'flashy.ResetPasswordController', | 12 | 12 | 'flashy.ResetPasswordController', | |
'ngCookies']). | 13 | 13 | 'ngCookies']). | |
config(['$stateProvider', '$urlRouterProvider', '$httpProvider', | 14 | 14 | config(['$stateProvider', '$urlRouterProvider', '$httpProvider', | |
'$locationProvider', | 15 | 15 | '$locationProvider', | |
function($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) { | 16 | 16 | function($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) { | |
'use strict'; | 17 | 17 | 'use strict'; | |
$httpProvider.defaults.withCredentials = true; | 18 | 18 | $httpProvider.defaults.withCredentials = true; | |
$httpProvider.defaults.xsrfCookieName = 'csrftoken'; | 19 | 19 | $httpProvider.defaults.xsrfCookieName = 'csrftoken'; | |
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; | 20 | 20 | $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; | |
$locationProvider.html5Mode(true); | 21 | 21 | $locationProvider.html5Mode(true); | |
$urlRouterProvider.otherwise('/home'); | 22 | 22 | $urlRouterProvider.otherwise('/home'); | |
$stateProvider. | 23 | 23 | $stateProvider. | |
state('login', { | 24 | 24 | state('login', { | |
url: '/login', | 25 | 25 | url: '/login', | |
templateUrl: 'templates/login.html', | 26 | 26 | templateUrl: 'templates/login.html', | |
controller: 'LoginController' | 27 | 27 | controller: 'LoginController' | |
}). | 28 | 28 | }). | |
state('logout', { | 29 | 29 | state('logout', { | |
url: '/logout', | 30 | 30 | url: '/logout', | |
templateUrl: 'templates/logout.html', | 31 | 31 | templateUrl: 'templates/logout.html', | |
controller: 'LogoutController' | 32 | 32 | controller: 'LogoutController' | |
}). | 33 | 33 | }). | |
state('root', { | 34 | 34 | state('root', { | |
url: '/', | 35 | 35 | url: '/', | |
templateUrl: 'templates/root.html', | 36 | 36 | templateUrl: 'templates/root.html', | |
controller: 'RootController' | 37 | 37 | controller: 'RootController' | |
}). | 38 | 38 | }). | |
state('feed', { | 39 | 39 | state('feed', { | |
url: '/feed', | 40 | 40 | url: '/feed', | |
templateUrl: 'templates/feed.html', | 41 | 41 | templateUrl: 'templates/feed.html', | |
controller: 'FeedController' | 42 | 42 | controller: 'FeedController' | |
}). | 43 | 43 | }). | |
state('addclass', { | 44 | 44 | state('addclass', { | |
url: '/addclass', | 45 | 45 | url: '/addclass', | |
templateUrl: 'templates/addclass.html', | 46 | 46 | templateUrl: 'templates/addclass.html', | |
controller: 'ClassAddController' | 47 | 47 | controller: 'ClassAddController' | |
}). | 48 | 48 | }). | |
state('deck', { | 49 | 49 | state('deck', { | |
url: '/deck', | 50 | 50 | url: '/deck', | |
templateUrl: 'templates/deck.html', | 51 | 51 | templateUrl: 'templates/deck.html', | |
controller: 'DeckController' | 52 | 52 | controller: 'DeckController' | |
}). | 53 | 53 | }). | |
state('review', { | 54 | 54 | state('review', { | |
url: '/review', | 55 | 55 | url: '/review', | |
templateUrl: 'templates/review.html', | 56 | 56 | templateUrl: 'templates/review.html', | |
controller: 'ReviewController' | 57 | 57 | controller: 'ReviewController' | |
}). | 58 | 58 | }). | |
state('flashcard', { | 59 | 59 | state('flashcard', { | |
url: '/flashcard', | 60 | 60 | url: '/flashcard', | |
templateUrl: 'templates/flashcard.html', | 61 | 61 | templateUrl: 'templates/flashcard.html', | |
controller: 'FlashcardController' | 62 | 62 | controller: 'FlashcardController' | |
}). | 63 | 63 | }). | |
state('requestpasswordreset', { | 64 | 64 | state('requestpasswordreset', { | |
url: '/requestpasswordreset', | 65 | 65 | url: '/requestpasswordreset', | |
templateUrl: 'templates/requestpasswordreset.html', | 66 | 66 | templateUrl: 'templates/requestpasswordreset.html', | |
controller: 'RequestResetController' | 67 | 67 | controller: 'RequestResetController' | |
}). | 68 | 68 | }). | |
state('resetpassword', { | 69 | 69 | state('resetpassword', { | |
url: '/resetpassword', | 70 | 70 | url: '/resetpassword', | |
71 | url: '/resetpassword/*', | |||
templateUrl: 'templates/resetpassword.html', | 71 | 72 | templateUrl: 'templates/resetpassword.html', | |
controller: 'ResetPasswordController' | 72 | 73 | controller: 'ResetPasswordController' | |
}); | 73 | 74 | }); | |
74 | 75 |
flashy.css
View file @
dd71074
.diclaimer { | 1 | 1 | .angucomplete-dropdown { | |
color:#00AFD8; | 2 | |||
} | 3 | |||
4 | ||||
.form-section { | 5 | |||
width: 330px; | 6 | |||
top: 50%; | 7 | |||
position: relative; | 8 | |||
} | 9 | |||
10 | ||||
.form-inputs { | 11 | |||
margin-top: 0px; | 12 | |||
border: 0px none; | 13 | |||
font: 16px/1.4 "Helvetica Neue","HelveticaNeue",Helvetica,Arial; | 14 | |||
padding: 5px 10px 11px 13px; | 15 | |||
width: 100%; | 16 | |||
box-sizing: border-box; | 17 | |||
} | 18 | |||
19 | ||||
.form-buttons { | 20 | |||
margin-top: 10px; | 21 | |||
width: 100%; | 22 | |||
font-size: 16px; | 23 | |||
} | 24 | |||
25 | ||||
.form-buttons .last-button { | 26 | |||
float: right; | 27 | |||
} | 28 | |||
29 | ||||
.container { | 30 | |||
position: relative; | 31 | |||
width: 600px; | 32 | |||
height: 80px; | 33 | |||
} | 34 | |||
35 | ||||
.angucomplete-dropdown { | 36 | |||
border-color: #ececec; | 37 | 2 | border-color: #ececec; | |
border-width: 1px; | 38 | 3 | border-width: 1px; | |
border-style: solid; | 39 | 4 | border-style: solid; | |
border-radius: 2px; | 40 | 5 | border-radius: 2px; | |
/*width: 250px;*/ | 41 | 6 | /*width: 250px;*/ | |
padding: 6px; | 42 | 7 | padding: 6px; | |
cursor: pointer; | 43 | 8 | cursor: pointer; | |
z-index: 9999; | 44 | 9 | z-index: 9999; | |
position: absolute; | 45 | 10 | position: absolute; | |
/*top: 32px; | 46 | 11 | /*top: 32px; | |
left: 0px; | 47 | 12 | left: 0px; | |
*/ | 48 | 13 | */ | |
margin-top: -6px; | 49 | 14 | margin-top: -6px; | |
background-color: #ffffff; | 50 | 15 | background-color: #ffffff; | |
} | 51 | 16 | } | |
52 | 17 | |||
.angucomplete-description { | 53 | 18 | .angucomplete-description { | |
font-size: 14px; | 54 | 19 | font-size: 14px; | |
} | 55 | 20 | } | |
56 | 21 | |||
.angucomplete-row { | 57 | 22 | .angucomplete-row { | |
padding: 5px; | 58 | 23 | padding: 5px; | |
color: #000000; | 59 | 24 | color: #000000; | |
margin-bottom: 4px; | 60 | 25 | margin-bottom: 4px; | |
clear: both; | 61 | 26 | clear: both; | |
} | 62 | 27 | } | |
63 | 28 | |||
.angucomplete-selected-row { | 64 | 29 | .angucomplete-selected-row { |
templates/requestpasswordreset.html
View file @
dd71074
<div class="row" ng-show="success"> | 1 | 1 | <div class="row" ng-show="success"> | |
<h1>Request Sent!</h1> | 2 | 2 | <h1>Request sent! Check your email in a few minutes.</h1> | |
</div> | 3 | 3 | </div> | |
4 | 4 | |||
<div class="row" ng-hide="success"> | 5 | 5 | <div class="row" ng-hide="success"> | |
<div class="offset-s2 col s8"> | 6 | 6 | <div class="offset-s2 col s8"> | |
<div class="card"> | 7 | 7 | <div class="card"> | |
<form class="col s12" name="passreset_form"> | 8 | 8 | <form class="col s12" name="passreset_form"> | |
<div class="card-content"> | 9 | 9 | <div class="card-content"> | |
<h2>Reset Password</h2> | 10 | 10 | <h2>Reset Password</h2> | |
</div> | 11 | 11 | </div> | |
12 | 12 | |||
<div class="divider"></div> | 13 | 13 | <div class="divider"></div> | |
<div name="passreset" class="card-content"> | 14 | 14 | <div name="passreset" class="card-content"> | |
<div class="section"> | 15 | 15 | <div class="section"> | |
<div ng-show="error" role="error"> | 16 | 16 | <div ng-show="error" role="error"> | |
<i style="color:#8E2323" class="mdi-alert-error"></i> | 17 | 17 | <i style="color:#8E2323" class="mdi-alert-error"></i> | |
<span style="color:#8E2323">Enter a valid email!</span> | 18 | 18 | <span style="color:#8E2323">Enter a valid email!</span> | |
</div> | 19 | 19 | </div> | |
</div> | 20 | 20 | </div> | |
<!--FORM INPUT--> | 21 | 21 | <!--FORM INPUT--> | |
<div class="input-field"> | 22 | 22 | <div class="input-field"> | |
<label for="email">Enter Your Email</label> | 23 | 23 | <label for="email">Enter Your Email</label> | |
<input id="email" type="email" class="form-control" ng-model="user_email" placeholder="" required /> | 24 | 24 | <input id="email" type="email" class="form-control" ng-model="user_email" placeholder="" required /> | |
</div> | 25 | 25 | </div> | |
</div> | 26 | 26 | </div> | |
27 | 27 | |||
<div class="card-action"> | 28 | 28 | <div class="card-action"> | |
<button class="btn waves-effect waves-light red" type="submit" name="action" | 29 | 29 | <button class="btn waves-effect waves-light red" type="submit" name="action" | |
ng-click="cancelReset()">Cancel</button> | 30 | 30 | ng-click="cancelReset()">Cancel</button> | |
<button class="btn waves-effect waves-light green right" type="submit" name="action" | 31 | 31 | <button class="btn waves-effect waves-light green right" type="submit" name="action" | |
ng-click="resetPass(user_email)">Reset</button> | 32 | 32 | ng-click="resetPass(user_email)">Reset</button> | |
</div> | 33 | 33 | </div> | |
</form> | 34 | 34 | </form> | |
</div> | 35 | 35 | </div> |
templates/resetpassword.html
View file @
dd71074
<div class="row" ng-hide="success"> | 1 | 1 | <div class="row" ng-hide="success"> | |
<h1>Reset Password Success!</h1> | 2 | 2 | <h1>Reset password successful!</h1> | |
</div> | 3 | 3 | </div> | |
4 | 4 | |||
<div class="container" ng-show="success"> | 5 | 5 | <div class="container" ng-show="success"> | |
<div class="row"> | 6 | 6 | <div class="row"> | |
<div class="offset-s2 col s8"> | 7 | 7 | <div class="offset-s2 col s8"> | |
<div class="card"> | 8 | 8 | <div class="card"> | |
<form class="col s12" name="resetpass_form"> | 9 | 9 | <form class="col s12" name="resetpass_form"> | |
<div class="card-content"> | 10 | 10 | <div class="card-content"> | |
<h2 class="">Reset Password</h2> | 11 | 11 | <h2 class="">Reset Password</h2> | |
</div> | 12 | 12 | </div> | |
<div class="divider"></div> | 13 | 13 | <div class="divider"></div> | |
<div class="card-content"> | 14 | 14 | <div class="card-content"> | |
<!--ERRORS--> | 15 | 15 | <!--ERRORS--> | |
<div role="alert" ng-show="error"> | 16 | 16 | <div role="alert" ng-show="error"> | |
<i style="color:#8E2323" class="mdi-alert-error"></i> | 17 | 17 | <i style="color:#8E2323" class="mdi-alert-error"></i> | |
<span style="color:#8E2323">Please check your reset password link!</span> | 18 | 18 | <span style="color:#8E2323">Please check your reset password link!</span> | |
</div> | 19 | 19 | </div> | |
<div role="alert" ng-show="mismatch && newPassword != confirmPassword"> | 20 | 20 | <div role="alert" ng-show="mismatch && newPassword != confirmPassword"> | |
<i style="color:#8E2323" class="mdi-alert-error"></i> | 21 | 21 | <i style="color:#8E2323" class="mdi-alert-error"></i> | |
<span style="color:#8E2323">Passwords do not match!</span> | 22 | 22 | <span style="color:#8E2323">Passwords do not match!</span> | |
</div> | 23 | 23 | </div> | |
<div role="alert" ng-show="unacceptable && newPassword.length < 8"> | 24 | 24 | <div role="alert" ng-show="unacceptable && newPassword.length < 8"> | |
<i style="color:#8E2323" class="mdi-alert-error"></i> | 25 | 25 | <i style="color:#8E2323" class="mdi-alert-error"></i> | |
<span style="color:#8E2323">Please make a password with at least 8 characters!</span> | 26 | 26 | <span style="color:#8E2323">Please make a password with at least 8 characters!</span> | |
</div> | 27 | 27 | </div> | |
<!--INPUTS--> | 28 | 28 | <!--INPUTS--> | |
<div class="input-field"> | 29 | 29 | <div class="input-field"> | |
<input id="newpassword" type="password" class="validate" ng-model="newPassword" placeholder="" required/> | 30 | 30 | <input id="newpassword" type="password" class="validate" ng-model="newPassword" placeholder="" required/> | |
<label for="newpassword">Password</label> | 31 | 31 | <label for="newpassword">Password</label> | |
</div> | 32 | 32 | </div> | |
<div class="input-field"> | 33 | 33 | <div class="input-field"> | |
<input id="confirmpassword" type="password" class="validate" ng-model="confirmPassword" placeholder="" required/> | 34 | 34 | <input id="confirmpassword" type="password" class="validate" ng-model="confirmPassword" placeholder="" required/> | |
<label for="confirmpassword">Confirm password</label> | 35 | 35 | <label for="confirmpassword">Confirm password</label> | |
</div> | 36 | 36 | </div> | |
</div> | 37 | 37 | </div> | |
38 | 38 | |||
<div class="card-action"> | 39 | 39 | <div class="card-action"> | |
<button class="btn waves-effect waves-light red" type="submit" name="action" | 40 | 40 | <button class="btn waves-effect waves-light red" type="submit" name="action" | |
ng-click="cancelReset()">Cancel</button> | 41 | 41 | ng-click="cancelReset()">Cancel</button> | |
<button class="btn waves-effect waves-light green right" type="submit" name="action" | 42 | 42 | <button class="btn waves-effect waves-light green right" type="submit" name="action" | |
ng-click="confirmResetPass()">Confirm</button> | 43 | 43 | ng-click="confirmResetPass()">Confirm</button> | |
</div> | 44 | 44 | </div> | |
</form> | 45 | 45 | </form> | |
</div> | 46 | 46 | </div> | |
</div> | 47 | 47 | </div> | |
</div> | 48 | 48 | </div> |