diff --git a/client/app/account/login/login.controller.js b/client/app/account/login/login.controller.js index b1f8d688..145707d7 100644 --- a/client/app/account/login/login.controller.js +++ b/client/app/account/login/login.controller.js @@ -1,10 +1,13 @@ 'use strict'; angular.module('observatory3App') - .controller('LoginController', function ($scope, Auth, $location) { + .controller('LoginController', function ($scope, Auth, $location, focus) { $scope.user = {}; $scope.errors = {}; + + focus('email'); + $scope.login = function(form) { $scope.submitted = true; diff --git a/client/app/account/login/login.html b/client/app/account/login/login.html index 5e5f4426..0c9e2213 100644 --- a/client/app/account/login/login.html +++ b/client/app/account/login/login.html @@ -1,48 +1,68 @@
-
-
-

Login

+
+
+

Login

+
-
-
+
+
+
+
+ -
- +
+ - -
+ +
-
- +
+ - -
+

+ Forgot Password +

+ +
-
-

- Please enter your email and password. -

-

- Please enter a valid email. -

-

{{ errors.other }}

-
+
+

+ Please enter your email and password. +

+

+ Please enter a valid email. +

+

{{ errors.other }}

+
-
- - - Register - - Forgot Password +
+ +
+ +
+
+
+
+
+
+
+
+
+ Need and Account? + + Sign Up + +
+
+
-
-
- -
-
+ +
diff --git a/client/app/account/signup/signup.controller.js b/client/app/account/signup/signup.controller.js index f32d6b49..80000833 100644 --- a/client/app/account/signup/signup.controller.js +++ b/client/app/account/signup/signup.controller.js @@ -1,10 +1,12 @@ 'use strict'; angular.module('observatory3App') - .controller('SignupCtrl', function ($scope, Auth, $location) { + .controller('SignupCtrl', function ($scope, Auth, $location, focus) { $scope.user = {}; $scope.errors = {}; + focus('name'); + $scope.register = function(form) { $scope.submitted = true; diff --git a/client/app/account/signup/signup.html b/client/app/account/signup/signup.html index 92874219..69aeb5c9 100644 --- a/client/app/account/signup/signup.html +++ b/client/app/account/signup/signup.html @@ -1,107 +1,123 @@
-
-
-

Sign up

+
+
+

Sign up

+
-
-
+
+
+
+
+ -
- +
+ - -

- A name is required -

-
+ +

+ A name is required +

+
-
- +
+ - -

- Doesn't look like a valid email. -

-

- What's your email address? -

-

- {{ errors.email }} -

-
+ +

+ Doesn't look like a valid email. +

+

+ What's your email address? +

+

+ {{ errors.email }} +

+
-
- - -

- What's your github username? -

-

- {{ errors.github }} -

-
+
+ + +

+ What's your github username? +

+

+ {{ errors.github }} +

+
-
- +
+ - -

- Password must be at least 3 characters. -

-

- {{ errors.password }} -

-
-
- + +

+ Password must be at least 3 characters. +

+

+ {{ errors.password }} +

+
+
+ - -

- Password must be at least 3 characters. -

-

- Passwords must match -

+ +

+ Password must be at least 3 characters. +

+

+ Passwords must match +

-
+
-
- - - Login - +
+ +
+ +
+
+
+
+
+
+
+
+
+ Have an Account? + + Login + +
+
+
- -
-
diff --git a/client/app/attend/attend.controller.js b/client/app/attend/attend.controller.js index bb94a38d..84b89f5f 100644 --- a/client/app/attend/attend.controller.js +++ b/client/app/attend/attend.controller.js @@ -1,7 +1,10 @@ 'use strict'; angular.module('observatory3App') - .controller('AttendCtrl', function ($scope, $stateParams, $http, Auth, User, $location, notify) { + .controller('AttendCtrl', function ($scope, $stateParams, $http, Auth, User, $location, notify, focus) { + // put text focus on day code + focus('dayCodeInput'); + $scope.submitDayCode = function(){ var user = Auth.getCurrentUser(); $http.put('/api/users/' + user._id + '/attend', { diff --git a/client/app/attend/attend.html b/client/app/attend/attend.html index befbcf0f..c42d8753 100644 --- a/client/app/attend/attend.html +++ b/client/app/attend/attend.html @@ -5,7 +5,7 @@
- + diff --git a/client/app/projects/projects.controller.js b/client/app/projects/projects.controller.js index ccbbc9c3..5814ec7d 100644 --- a/client/app/projects/projects.controller.js +++ b/client/app/projects/projects.controller.js @@ -1,11 +1,11 @@ 'use strict'; angular.module('observatory3App') - -.controller('ProjectsCtrl', function ($scope, $location, $http, Auth) { +.controller('ProjectsCtrl', function ($scope, $location, $http, Auth, focus) { $scope.projects = []; $scope.projectToAdd = {active: true, repositories: [""]}; $scope.loggedIn = false; + focus('searchProjectsInput'); Auth.isLoggedInAsync(function(loggedIn){ if (loggedIn){ diff --git a/client/app/projects/projects.html b/client/app/projects/projects.html index 3ab04f78..8bf9ae3a 100644 --- a/client/app/projects/projects.html +++ b/client/app/projects/projects.html @@ -9,7 +9,7 @@

{{ past ? "Past" : "Active" }} Projects

- +
diff --git a/client/components/factories/focusMe.factory.js b/client/components/factories/focusMe.factory.js new file mode 100644 index 00000000..1df2c9d9 --- /dev/null +++ b/client/components/factories/focusMe.factory.js @@ -0,0 +1,12 @@ +'use strict'; + +angular.module('observatory3App') +.factory('focus', function($timeout, $window){ + return function(id) { + $timeout(function() { + var element = $window.document.getElementById(id); + if(element) + element.focus(); + }); + }; +}); diff --git a/client/index.html b/client/index.html index cc4c0a66..d79ff046 100644 --- a/client/index.html +++ b/client/index.html @@ -113,6 +113,7 @@
+