commit
daf39d81cd
2 changed files with 48 additions and 8 deletions
|
@ -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()
|
||||
|
@ -59,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.')
|
||||
|
@ -67,6 +65,39 @@ 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
|
||||
|
||||
// $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
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="register">
|
||||
<md-content layout-padding>
|
||||
<h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1>
|
||||
<md-card layout-padding>
|
||||
<h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1>
|
||||
<center>
|
||||
First Login Of {{user.name}}
|
||||
<div class="avatar">
|
||||
|
@ -18,8 +18,17 @@
|
|||
<br></br>
|
||||
<div layout="row" layout-align="center center">
|
||||
<p>Are You A Lecturer?</p>
|
||||
<md-switch class="md-primary" md-no-ink aria-label="Switch No Ink" ng-model="data.cb5">
|
||||
</md-switch>
|
||||
<md-switch ng-click = "lecturerPrivilege(data.cb1)" ng-model="data.cb1" aria-label="Switch 1">
|
||||
Switch 1: {{ data.cb1 }}
|
||||
<div ng-if="data">
|
||||
<!-- <md-progress-circular class="md-hue-2" md-mode="indeterminate">
|
||||
</md-progress-circular> -->
|
||||
</div>
|
||||
</md-switch>
|
||||
|
||||
<!-- TODO original -->
|
||||
<!-- <md-switch class="md-primary" md-no-ink aria-label="Switch No Ink" ng-model="data.cb5">
|
||||
</md-switch> -->
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue