From c4b077a32fa69c894072aff6a42a572f4324c889 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Sun, 14 Jun 2015 18:54:51 +0300 Subject: [PATCH] interface position fixed --- templates/css/theme.css | 97 +++++++++++++++-- .../js/controllers/registerController.js | 67 +++++++++--- templates/views/register.html | 100 +++++++++++------- 3 files changed, 204 insertions(+), 60 deletions(-) diff --git a/templates/css/theme.css b/templates/css/theme.css index 641b870..a4067cd 100644 --- a/templates/css/theme.css +++ b/templates/css/theme.css @@ -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 */ -} \ No newline at end of file +} + +/* 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; +} +*/ + + + + diff --git a/templates/js/controllers/registerController.js b/templates/js/controllers/registerController.js index f403fb4..dc4d561 100644 --- a/templates/js/controllers/registerController.js +++ b/templates/js/controllers/registerController.js @@ -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() + // { + + // }); + + + }]); \ No newline at end of file diff --git a/templates/views/register.html b/templates/views/register.html index 3312902..c312d3d 100644 --- a/templates/views/register.html +++ b/templates/views/register.html @@ -1,42 +1,70 @@
-

Registration

- -
-

First Login Of {{user.name}}

-
- {{item.who}} -
-
-

- - - - - Are You A Lecturer? -
- - " I Am A Lecturer... ": {{ user.isLecturer }} - +

Registration

+ +
+

First Login Of {{user.name}}

+
+ {{item.who}} +
+
+

+
+
+ + + + +
+
+ Are You A Lecturer? + + +
+
+
+ +
+
+
+ campusAvatar
-
- +
+
+
- Submit - + Submit
- -

- Note: This setting can be changed in the future.
- But Choose Now for easy Registration... -

- - - +
+
+
+
+
+ + + + +
+
+
+
+ {{campusObj.email_ending}} +
+
+
+ +
+
+ + + \ No newline at end of file