From fd11a512bd1faf8c6d57fd602fd9044f6f8d3f37 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Mon, 15 Jun 2015 17:46:02 +0300 Subject: [PATCH 1/2] changing branch name to UI --- .../js/controllers/registerController.js | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/templates/js/controllers/registerController.js b/templates/js/controllers/registerController.js index c243edc..71abbaa 100644 --- a/templates/js/controllers/registerController.js +++ b/templates/js/controllers/registerController.js @@ -1,7 +1,6 @@ angular.module('SeHub') .controller('registerController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope) { - $scope.userHasNoName = false; $scope.campusChecked = false; $scope.isEmpty = true; // if the academic email line is empty @@ -31,7 +30,6 @@ angular.module('SeHub') { // TODO }); - }); $scope.dropdownClicked = function() @@ -67,6 +65,28 @@ angular.module('SeHub') }); }; }; + + + // TODO FOR LATER - toast + // TODO FOR LATER + + // $scope.getPopWindowPosition = function() + // { + // return Object.keys($scope.toastPosition).filter(function(pos) + // { + // return $scope.toastPosition[pos]; + // }).join(' '); + // }; + + // $scope.toastPosition = + // { + // bottom: false, + // top: true, + // left: false, + // right: true + // }; + + // TODO FOR LATER + // TODO FOR LATER + }]); - - From 06a883e103cf61f9371849b538cf20345734b7f3 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Mon, 15 Jun 2015 19:12:54 +0300 Subject: [PATCH 2/2] documentation added alpha test for userPrivilege --- templates/js/controllers/registerController.js | 13 ++++++++++++- templates/views/register.html | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/templates/js/controllers/registerController.js b/templates/js/controllers/registerController.js index 71abbaa..b46bc91 100644 --- a/templates/js/controllers/registerController.js +++ b/templates/js/controllers/registerController.js @@ -57,7 +57,7 @@ angular.module('SeHub') $mdDialog.show($mdDialog.alert().title('E-mail Verification').content('A verification e-mail has been sent to your email address.') .ariaLabel('Email verification alert dialog').ok('Got it!').targetEvent(ev)); // Pop-up alert for e-mail verification $cookieStore.remove("com.sehub.www"); // Removing the cookies - $window.location.href = 'http://se-hub.appspot.com'; + $window.location.href = 'http://se-hub.appspot.com'; // Reference to 'welcome' page }).error(function() { $mdDialog.show($mdDialog.alert().title('Error - E-mail Verification').content('An error has occured in your e-mail address.') @@ -66,6 +66,17 @@ angular.module('SeHub') }; }; + $scope.lecturerPrivilege = function(data) + { + // console.log("Now " + data); + var isLecturer; + if(!data) // if i am a lecturer (when pressing -> getting last data value before pressing) = "!data" => I Am Lecturer + { + isLecturer = true; + console.log("im lecturer " + isLecturer); + } + } + // TODO FOR LATER - toast // TODO FOR LATER diff --git a/templates/views/register.html b/templates/views/register.html index 7bbebc3..dad2074 100644 --- a/templates/views/register.html +++ b/templates/views/register.html @@ -1,7 +1,7 @@
-

Registration

+

Registration

First Login Of {{user.name}}
@@ -18,8 +18,17 @@

Are You A Lecturer?

- - + + Switch 1: {{ data.cb1 }} +
+ +
+
+ + +