commit
eafb124760
3 changed files with 204 additions and 60 deletions
|
@ -54,21 +54,100 @@ body.noscroll
|
|||
}
|
||||
|
||||
.avatar {
|
||||
border: 1px solid white;
|
||||
height: 90px;
|
||||
width: 90px;
|
||||
display: block;
|
||||
border-radius: 45px;
|
||||
box-shadow: 1px 1px 1px rgba(0,0,0, 0.7);
|
||||
float: left;
|
||||
margin-top: 1em;
|
||||
margin-right: 1em;
|
||||
position: relative;
|
||||
|
||||
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
|
||||
-webkit-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
/*.avatar {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}*/
|
||||
|
||||
.avatar img {
|
||||
border-radius: 40px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin: 6px; /* centers the image in the parent element */
|
||||
}
|
||||
}
|
||||
|
||||
/* Added BY devMatan */
|
||||
|
||||
/*.disabledSubmitButton:
|
||||
{
|
||||
/*background: #f7f7f7;*/
|
||||
/*border-radius: 10000px;*/
|
||||
/*text-align: center;*/
|
||||
|
||||
/*position: relative !important;*
|
||||
|
||||
}*/
|
||||
|
||||
.campusAvatar:
|
||||
{
|
||||
float: left;
|
||||
margin-top: 1em;
|
||||
margin-right: 1em;
|
||||
position: relative;
|
||||
width:70%;
|
||||
height:auto;
|
||||
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
|
||||
-webkit-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.spacer{
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.port_spacer{
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.mail_suffix{
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/*div.img campusAvatar
|
||||
{
|
||||
border: 1px solid #0000ff;
|
||||
padding-right: 10px;
|
||||
float:right;
|
||||
}*/
|
||||
|
||||
/*.dropDown: /* TODO *
|
||||
{
|
||||
border-bottom: 2px black solid;
|
||||
border-top: 2px black solid;
|
||||
border-left: 2px black solid;
|
||||
border-right: 2px black solid;
|
||||
border-radius: 1px black solid;
|
||||
}*/
|
||||
|
||||
|
||||
/*
|
||||
h1
|
||||
{
|
||||
position:center;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
angular.module('SeHub')
|
||||
.controller('registerController', ['$scope', '$rootScope', function ($scope, $rootScope) {
|
||||
.controller('registerController', ['$scope', 'apiService', '$rootScope', function ($scope, apiService ,$rootScope) {
|
||||
|
||||
$scope.userHasNoName = false;
|
||||
$scope.campusChecked = false;
|
||||
$scope.isEmpty = true; // if the academic email line is empty
|
||||
// $scope.fullMail = $scope.academicEmail + $scope.campusObj.email_ending; // Will hold the full academic email of the user
|
||||
|
||||
|
||||
$scope.user = $rootScope.user;
|
||||
if($scope.user.name === ";"){
|
||||
|
@ -10,21 +14,54 @@ angular.module('SeHub')
|
|||
$scope.userHasNoName = true;
|
||||
}
|
||||
|
||||
///TESTING
|
||||
$scope.campuses = [
|
||||
{
|
||||
title: 'JCE',
|
||||
capus_avatar: "http://asdasfa.asdasd.com/img.jpg"
|
||||
},
|
||||
{
|
||||
title: 'JCE1',
|
||||
capus_avatar: "http://asdasfa.asdasd.com/img.jpg"
|
||||
},
|
||||
{
|
||||
title: "JCE2",
|
||||
capus_avatar: "http://asdasfa.asdasd.com/img.jpg"
|
||||
$scope.dropdownClicked = function()
|
||||
{
|
||||
console.log($scope.fullMail);
|
||||
if($scope.campus){
|
||||
$scope.campusChecked = true;
|
||||
$scope.campusObj = null;
|
||||
for (var i = $scope.campuses.length - 1; i >= 0; i--) {
|
||||
if($scope.campuses[i].title == $scope.campus){
|
||||
$scope.campusObj = $scope.campuses[i];
|
||||
console.log($scope.campusObj);
|
||||
}
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
$scope.submitClicked = function()
|
||||
{
|
||||
if($scope.academicEmail === "")
|
||||
isEmpty = true;
|
||||
else{
|
||||
$scope.isEmpty = false;
|
||||
$scope.academicEmail = "matanbr";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
apiService.getAllCampuses($scope.user.seToken).success(function(data)
|
||||
{
|
||||
$scope.campuses = data;
|
||||
}).error(function()
|
||||
{
|
||||
// TODO
|
||||
});
|
||||
|
||||
// apiService.sendValidationMail($scope.user.seToken, $scope.fullMail).success(function(data) // TODO: Add 2nd parameter email type Email
|
||||
// {
|
||||
// console.log($scope.fullMail);
|
||||
// console.log("200");
|
||||
|
||||
// // TODO
|
||||
// }).error(function()
|
||||
// {
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
|
@ -1,42 +1,70 @@
|
|||
<div class="register">
|
||||
<md-content layout-padding>
|
||||
<h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1>
|
||||
<md-card class="wellcome-float" style="margin-top: 15px;">
|
||||
<center>
|
||||
<p>First Login Of {{user.name}}</p>
|
||||
<div class="avatar">
|
||||
<img ng-src="{{user.avatar_url}}" alt="{{item.who}}" />
|
||||
</div>
|
||||
</center>
|
||||
<br><br>
|
||||
<md-input-container ng-if="userHasNoName">
|
||||
<label>Full Name: </label>
|
||||
<input ng-model="user.name" required>
|
||||
</md-input-container>
|
||||
Are You A Lecturer?
|
||||
<div>
|
||||
<md-switch ng-model="user.isLecturer" aria-label="Switch 1">
|
||||
" I Am A Lecturer... ": {{ user.isLecturer }}
|
||||
</md-switch>
|
||||
<h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1>
|
||||
<md-card class="wellcome-float" style="margin-top: 15px;">
|
||||
<center>
|
||||
<p>First Login Of {{user.name}}</p>
|
||||
<div class="avatar">
|
||||
<img ng-src="{{user.avatar_url}}" alt="{{item.who}}" style="position:center !important;"/>
|
||||
</div>
|
||||
</center>
|
||||
<br><br>
|
||||
<div layout="col">
|
||||
<div>
|
||||
<md-input-container ng-if="userHasNoName">
|
||||
<label>Full Name: </label>
|
||||
<input ng-model="user.name" required>
|
||||
</md-input-container>
|
||||
</div>
|
||||
<div layout="row" layout-align="center center">
|
||||
Are You A Lecturer?
|
||||
<md-switch ng-model="user.isLecturer" aria-label="Switch 1">
|
||||
</md-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class = "dropDown">
|
||||
<md-select placeholder="Pick your Campus" ng-model="campus" style="z-index: 300" ng-change="dropdownClicked()">
|
||||
<md-option ng-repeat="c in campuses" value="{{c.title}}">{{c.title}}</md-option>
|
||||
</md-select>
|
||||
</div>
|
||||
<div layout="col">
|
||||
<div>
|
||||
<div class="campusAvatar" ng-if="campusChecked">
|
||||
<img ng-src="{{campusObj.avatar_url}}" alt="campusAvatar">
|
||||
</div>
|
||||
<center>
|
||||
<div class = "dropDown">
|
||||
<md-select placeholder="Pick your Campus" ng-model="campus" style="z-index: 9999" ng-change="dropdownClicked()">
|
||||
<md-option ng-repeat="c in campuses" value="{{c.title}}">{{c.title}}</md-option>
|
||||
</md-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class = "disabledSubmitButton">
|
||||
<md-button ng-disabled="!campusChecked" class="md-raised md-primary">Submit</md-button>
|
||||
|
||||
<md-button ng-disabled="!campusChecked" class="md-raised md-primary">Submit</md-button>
|
||||
</div>
|
||||
<!-- <div class = "submitButton">
|
||||
<md-button class="md-raised md-primary">Submit</md-button>
|
||||
</div> -->
|
||||
<p>
|
||||
<b>Note:</b> This setting can be changed in the future. <br>
|
||||
But Choose Now for easy Registration...
|
||||
</p>
|
||||
</center>
|
||||
</md-card>
|
||||
</md-content>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="row" layout-align="center center">
|
||||
<div ng-if="campusChecked">
|
||||
<div>
|
||||
<md-input-container>
|
||||
<label>Academic Email</label>
|
||||
<input ng-model="academicEmail" required>
|
||||
</md-input-container>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mail_suffix">
|
||||
{{campusObj.email_ending}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div> // TODO return
|
||||
<p>
|
||||
<b>Note:</b> This setting can be changed in the future. <br>
|
||||
But Choose Now for easy Registration...
|
||||
</p>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</md-card>
|
||||
</md-content>
|
||||
</div>
|
Loading…
Reference in a new issue