Merge pull request #28 from sagidayan/matanBranch

Matan branch
This commit is contained in:
Sagi Dayan 2015-06-15 16:54:24 +03:00
commit cf5bb8e1ab
4 changed files with 66 additions and 109 deletions

View file

@ -18,6 +18,11 @@ md-list .md-button {
/* Using Data-URI converted from svg until <md-icon> becomes available /* Using Data-URI converted from svg until <md-icon> becomes available
https://github.com/google/material-design-icons https://github.com/google/material-design-icons
*/ */
p {
margin-left: 2em;
}
.menuBtn { .menuBtn {
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGcgaWQ9IkhlYWRlciI+CiAgICA8Zz4KICAgICAgICA8cmVjdCB4PSItNjE4IiB5PSItMjIzMiIgZmlsbD0ibm9uZSIgd2lkdGg9IjE0MDAiIGhlaWdodD0iMzYwMCIvPgogICAgPC9nPgo8L2c+CjxnIGlkPSJMYWJlbCI+CjwvZz4KPGcgaWQ9Ikljb24iPgogICAgPGc+CiAgICAgICAgPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+CiAgICAgICAgPHBhdGggZD0iTTMsMThoMTh2LTJIM1YxOHogTTMsMTNoMTh2LTJIM1YxM3ogTTMsNnYyaDE4VjZIM3oiIHN0eWxlPSJmaWxsOiNmM2YzZjM7Ii8+CiAgICA8L2c+CjwvZz4KPGcgaWQ9IkdyaWQiIGRpc3BsYXk9Im5vbmUiPgogICAgPGcgZGlzcGxheT0iaW5saW5lIj4KICAgIDwvZz4KPC9nPgo8L3N2Zz4=) no-repeat center center; background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGcgaWQ9IkhlYWRlciI+CiAgICA8Zz4KICAgICAgICA8cmVjdCB4PSItNjE4IiB5PSItMjIzMiIgZmlsbD0ibm9uZSIgd2lkdGg9IjE0MDAiIGhlaWdodD0iMzYwMCIvPgogICAgPC9nPgo8L2c+CjxnIGlkPSJMYWJlbCI+CjwvZz4KPGcgaWQ9Ikljb24iPgogICAgPGc+CiAgICAgICAgPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+CiAgICAgICAgPHBhdGggZD0iTTMsMThoMTh2LTJIM1YxOHogTTMsMTNoMTh2LTJIM1YxM3ogTTMsNnYyaDE4VjZIM3oiIHN0eWxlPSJmaWxsOiNmM2YzZjM7Ii8+CiAgICA8L2c+CjwvZz4KPGcgaWQ9IkdyaWQiIGRpc3BsYXk9Im5vbmUiPgogICAgPGcgZGlzcGxheT0iaW5saW5lIj4KICAgIDwvZz4KPC9nPgo8L3N2Zz4=) no-repeat center center;
} }
@ -54,19 +59,13 @@ body.noscroll
} }
.avatar { .avatar {
float: left;
margin-top: 1em; margin-top: 1em;
margin-right: 1em; margin-right: 1em;
position: relative; position: center;
-webkit-border-radius: 30%;
-webkit-border-radius: 50%; -moz-border-radius: 30%;
-moz-border-radius: 50%; border-radius: 30%;
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 {
@ -75,9 +74,10 @@ body.noscroll
.avatar img { .avatar img {
border-radius: 40px; border-radius: 40px;
position:center;
width: 80px; width: 80px;
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 */ /* Added BY devMatan */
@ -92,22 +92,19 @@ body.noscroll
}*/ }*/
.campusAvatar: .campusAvatar img
{ {
float: left; /*
margin-top: 1em; margin-top: 1em;
margin-right: 1em; margin-right: 1em;
position: relative; position: center;
width:70%; */
height:auto;
-webkit-border-radius: 50%; border-radius: 40px;
-moz-border-radius: 50%; position:center;
border-radius: 50%; width: 80px;
height: 80px;
-webkit-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2); margin: 6px;
-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{ .spacer{
@ -131,7 +128,7 @@ body.noscroll
float:right; float:right;
}*/ }*/
/*.dropDown: /* TODO * /*.dropDown /* TODO *
{ {
border-bottom: 2px black solid; border-bottom: 2px black solid;
border-top: 2px black solid; border-top: 2px black solid;
@ -139,15 +136,3 @@ body.noscroll
border-right: 2px black solid; border-right: 2px black solid;
border-radius: 1px black solid; border-radius: 1px black solid;
}*/ }*/
/*
h1
{
position:center;
}
*/

View file

@ -1,5 +1,5 @@
angular.module('SeHub') angular.module('SeHub')
.controller('registerController', ['$scope', '$cookies', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $location, $mdToast, $mdDialog, apiService ,$rootScope) .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.userHasNoName = false;
@ -57,10 +57,9 @@ angular.module('SeHub')
{ {
console.log("DONE - 200"); console.log("DONE - 200");
$mdDialog.show($mdDialog.alert().title('E-mail Verification').content('A verification e-mail has been sent to your email address.') $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)); .ariaLabel('Email verification alert dialog').ok('Got it!').targetEvent(ev)); // Pop-up alert for e-mail verification
// TODO - ADD DELETE COOKIES $cookieStore.remove("com.sehub.www"); // Removing the cookies
$cookies.remove("com.sehub.www"); $window.location.href = 'http://se-hub.appspot.com';
// $location.path("templates/views/home.html"); // Redirecting to home page // TODO REMOVE REMOVE!!
}).error(function() }).error(function()
{ {
$mdDialog.show($mdDialog.alert().title('Error - E-mail Verification').content('An error has occured in your e-mail address.') $mdDialog.show($mdDialog.alert().title('Error - E-mail Verification').content('An error has occured in your e-mail address.')
@ -68,31 +67,6 @@ angular.module('SeHub')
}); });
}; };
}; };
// TODO FOR LATER
// 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
}]); }]);

View file

@ -32,11 +32,11 @@
</div> </div>
</div> </div>
<!-- Angular Material Dependencies --> <!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-route.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-route.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-aria.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-cookies.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-cookies.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.8.3/angular-material.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.8.3/angular-material.min.js"></script>

View file

@ -1,44 +1,44 @@
<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 layout-padding>
<center> <center>
<p>First Login Of {{user.name}}</p> First Login Of {{user.name}}
<div class="avatar"> <div class="avatar">
<img ng-src="{{user.avatar_url}}" alt="{{item.who}}" style="position:center !important;"/> <img ng-src="{{user.avatar_url}}" alt="{{item.who}}">
</div>
</center>
<div layout="col">
<div>
<md-input-container ng-if="userHasNoName">
<label>Full Name: </label>
<input ng-model="user.name" required>
</md-input-container>
</div>
<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>
</div>
</div> </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 class="md-primary" md-no-ink aria-label="Switch No Ink" ng-model="data.cb5">
</md-switch>
</div>
</div>
<div> <div>
<div class = "dropDown"> <div class = "dropDown">
<md-select placeholder="Pick your Campus" ng-model="campus" style="z-index: 300" ng-change="dropdownClicked()"> <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-option ng-repeat="c in campuses" value="{{c.title}}">{{c.title}}</md-option>
</md-select> </md-select>
</div>
</div> </div>
<div layout="col"> <div layout="col" layout-align="center center">
<div> <div>
<div class="campusAvatar" ng-if="campusChecked"> <div class="campusAvatar" ng-if="campusChecked">
<img ng-src="{{campusObj.avatar_url}}" alt="campusAvatar"> <img ng-src="{{campusObj.avatar_url}}" alt="campusAvatar">
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<div class = "disabledSubmitButton"> <div class = "disabledSubmitButton">
<md-button ng-click="submitClicked($event)" ng-disabled="!campusChecked" class="md-raised md-primary">Submit</md-button> <md-button ng-click="submitClicked($event)" ng-disabled="!campusChecked" class="md-raised md-primary">Submit</md-button>
</div>
</div> </div>
</div> </div>
<div layout="row" layout-align="center center"> <div layout="row" layout-align="center center">
@ -56,14 +56,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div> // TODO return <!-- <div> // TODO return
<p> <p>
<b>Note:</b> This setting can be changed in the future. <br> <b>Note:</b> This setting can be changed in the future. <br>
But Choose Now for easy Registration... But Choose Now for easy Registration...
</p> </p>
</div> --> </div> -->
</div>
</div>
</md-card> </md-card>
</md-content> </md-content>