interface position fixed

This commit is contained in:
Matan Bar Yosef 2015-06-14 18:54:51 +03:00
parent 32f0ffa9a0
commit c4b077a32f
3 changed files with 204 additions and 60 deletions

View file

@ -54,17 +54,24 @@ body.noscroll
} }
.avatar { .avatar {
border: 1px solid white; float: left;
height: 90px; margin-top: 1em;
width: 90px; margin-right: 1em;
display: block; position: relative;
border-radius: 45px;
box-shadow: 1px 1px 1px rgba(0,0,0, 0.7);
-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); background: rgba(0, 0, 0, 0.2);
} }*/
.avatar img { .avatar img {
border-radius: 40px; border-radius: 40px;
@ -72,3 +79,75 @@ body.noscroll
height: 80px; height: 80px;
margin: 6px; /* centers the image in the parent element */ 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;
}
*/

View file

@ -1,7 +1,11 @@
angular.module('SeHub') angular.module('SeHub')
.controller('registerController', ['$scope', '$rootScope', function ($scope, $rootScope) { .controller('registerController', ['$scope', 'apiService', '$rootScope', function ($scope, apiService ,$rootScope) {
$scope.userHasNoName = false; $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; $scope.user = $rootScope.user;
if($scope.user.name === ";"){ if($scope.user.name === ";"){
@ -10,21 +14,54 @@ angular.module('SeHub')
$scope.userHasNoName = true; $scope.userHasNoName = true;
} }
///TESTING $scope.dropdownClicked = function()
$scope.campuses = [ {
{ console.log($scope.fullMail);
title: 'JCE', if($scope.campus){
capus_avatar: "http://asdasfa.asdasd.com/img.jpg" $scope.campusChecked = true;
}, $scope.campusObj = null;
{ for (var i = $scope.campuses.length - 1; i >= 0; i--) {
title: 'JCE1', if($scope.campuses[i].title == $scope.campus){
capus_avatar: "http://asdasfa.asdasd.com/img.jpg" $scope.campusObj = $scope.campuses[i];
}, console.log($scope.campusObj);
{ }
title: "JCE2", };
capus_avatar: "http://asdasfa.asdasd.com/img.jpg"
} }
];
}
$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()
// {
// });
}]); }]);

View file

@ -1,42 +1,70 @@
<div class="register"> <div class="register">
<md-content layout-padding> <md-content layout-padding>
<h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1> <h1 style="margin-left:15px"><i class="fa fa-pencil"></i> Registration</h1>
<md-card class="wellcome-float" style="margin-top: 15px;"> <md-card class="wellcome-float" style="margin-top: 15px;">
<center> <center>
<p>First Login Of {{user.name}}</p> <p>First Login Of {{user.name}}</p>
<div class="avatar"> <div class="avatar">
<img ng-src="{{user.avatar_url}}" alt="{{item.who}}" /> <img ng-src="{{user.avatar_url}}" alt="{{item.who}}" style="position:center !important;"/>
</div> </div>
</center> </center>
<br><br> <br><br>
<md-input-container ng-if="userHasNoName"> <div layout="col">
<label>Full Name: </label> <div>
<input ng-model="user.name" required> <md-input-container ng-if="userHasNoName">
</md-input-container> <label>Full Name: </label>
Are You A Lecturer? <input ng-model="user.name" required>
<div> </md-input-container>
<md-switch ng-model="user.isLecturer" aria-label="Switch 1"> </div>
" I Am A Lecturer... ": {{ user.isLecturer }} <div layout="row" layout-align="center center">
</md-switch> Are You A Lecturer?
</div> <md-switch ng-model="user.isLecturer" aria-label="Switch 1">
<center> </md-switch>
<div class = "dropDown"> </div>
<md-select placeholder="Pick your Campus" ng-model="campus" style="z-index: 9999" ng-change="dropdownClicked()"> </div>
<md-option ng-repeat="c in campuses" value="{{c.title}}">{{c.title}}</md-option> <div>
</md-select> <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> </div>
</div>
</div>
<div>
<div class = "disabledSubmitButton"> <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>
<!-- <div class = "submitButton"> </div>
<md-button class="md-raised md-primary">Submit</md-button> </div>
</div> --> <div layout="row" layout-align="center center">
<p> <div ng-if="campusChecked">
<b>Note:</b> This setting can be changed in the future. <br> <div>
But Choose Now for easy Registration... <md-input-container>
</p> <label>Academic Email</label>
</center> <input ng-model="academicEmail" required>
</md-card> </md-input-container>
</md-content> </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> </div>