Merge pull request #47 from sagidayan/UI

Ui
This commit is contained in:
Sagi Dayan 2015-06-17 22:45:52 +03:00
commit 3756d8b2a6
2 changed files with 85 additions and 31 deletions

View file

@ -111,37 +111,39 @@ body.noscroll
}*/ }*/
.campusAvatar img .campusAvatar img
{ {
/* /*
margin-top: 1em; margin-top: 1em;
margin-right: 1em; margin-right: 1em;
position: center; position: center;
*/ */
border-radius: 40px; border-radius: 40px;
position:center; position:center;
width: 80px; width: 80px;
height: 80px; height: 80px;
margin: 6px; margin: 6px;
-webkit-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75); -webkit-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
-moz-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75); -moz-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75); box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
} }
.spacer{ .spacer{
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
} }
.port_spacer{ .port_spacer
margin-top: auto; {
margin-bottom: auto; margin-top: auto;
} margin-bottom: auto;
}
.mail_suffix{ .mail_suffix
margin-top: auto; {
} margin-top: auto;
}
.createCampus .createCampus
@ -149,6 +151,43 @@ body.noscroll
position:relative; position:relative;
} }
.listdemoBasicUsage md-divider
{
margin-top: 10px;
margin-bottom: 10px;
}
.md-avatar img
{
/*TODO*/
}
.feedContent
{
padding-left: 6%;
font-size: 15px;
display:table;
}
.md-no-sticky
{
background-color: blue;
}
.roundUserAvatar
{
width: 6%;
height: auto;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
/*background: url(http://i61.tinypic.com/v86f7.png) no-repeat;*/
box-shadow: 0 0 8px rgba(0, 0, 0, .8);
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
}
/*div.img campusAvatar /*div.img campusAvatar
{ {

View file

@ -6,11 +6,11 @@ angular.module('SeHub')
$scope.createCampusClicked = false; $scope.createCampusClicked = false;
$scope.isEmpty = true; // if the academic email line is empty $scope.isEmpty = true; // if the academic email line is empty
$scope.jsonCreateCampus = $scope.jsonCreateCampus =
{ {
"title": "Create Campus", "title": "Create Campus",
"email": "email_ending", "email": "email_ending",
"avatar": "self.avatar.url" "avatar": "self.avatar.url"
} }
$rootScope.seToken = $cookies['com.sehub.www']; $rootScope.seToken = $cookies['com.sehub.www'];
var token = $rootScope.seToken; var token = $rootScope.seToken;
@ -57,10 +57,25 @@ angular.module('SeHub')
$scope.submitClicked = function(ev) $scope.submitClicked = function(ev)
{ {
var emailValid = false; var emailValid = false;
var jsonUpdateUser =
{
"lecturerStat": "$scope.user.isLecturer",
"campName": "$scope.campusName"
}
if($scope.user.AcMail != null) if($scope.user.AcMail != null)
{ {
var fullMail = $scope.user.AcMail + $scope.campusObj.email_ending; // Holds the full academic email of the user var fullMail = $scope.user.AcMail + $scope.campusObj.email_ending; // Holds the full academic email of the user
apiService.updateUser($scope.user.seToken, jsonUpdateUser).success(function(data)
{
}).error(function()
{
// TODO Error
console.log("Error occured on updateUser");
});
console.log("Mail: " + fullMail); console.log("Mail: " + fullMail);
apiService.sendValidationMail($scope.user.seToken, fullMail).success(function(data) apiService.sendValidationMail($scope.user.seToken, fullMail).success(function(data)