Merge pull request #50 from sagidayan/UI
- Add message for lecturer - ADDED
This commit is contained in:
commit
19aa25de2a
4 changed files with 168 additions and 140 deletions
|
@ -33,9 +33,9 @@ md-list .md-button {
|
||||||
https://github.com/google/material-design-icons
|
https://github.com/google/material-design-icons
|
||||||
*/
|
*/
|
||||||
|
|
||||||
p {
|
/*p {
|
||||||
margin-left: 2em;
|
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;
|
||||||
|
@ -147,7 +147,7 @@ body.noscroll
|
||||||
.feed
|
.feed
|
||||||
{
|
{
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 300px;
|
height: 350px;
|
||||||
/*width: 100%;*/
|
/*width: 100%;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,17 +349,11 @@ body.noscroll
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*gridList Effects*/
|
|
||||||
|
|
||||||
md-grid-list
|
/* Colors*/
|
||||||
{
|
.gray{
|
||||||
margin: 8px;
|
|
||||||
}
|
|
||||||
.gray
|
|
||||||
{
|
|
||||||
background:#f5f5f5;
|
background:#f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aliceblue {
|
.aliceblue {
|
||||||
background: aliceblue;
|
background: aliceblue;
|
||||||
}
|
}
|
||||||
|
@ -378,6 +372,7 @@ md-grid-list
|
||||||
.red {
|
.red {
|
||||||
background: #ff8a80;
|
background: #ff8a80;
|
||||||
}
|
}
|
||||||
|
/* End Colors */
|
||||||
|
|
||||||
.whiteframedemoBasicUsage md-whiteframe {
|
.whiteframedemoBasicUsage md-whiteframe {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -385,40 +380,40 @@ md-grid-list
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* md-grid-tile {
|
|
||||||
transition: all 400ms ease-out 50ms;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*END gridList Effects*/
|
|
||||||
|
|
||||||
|
|
||||||
.tasksContent
|
.tasksContent
|
||||||
{
|
{
|
||||||
/*float:left;*/
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
margin: 5px;
|
||||||
|
background-color: aliceblue;
|
||||||
|
overflow: scroll;
|
||||||
|
height:250;
|
||||||
|
width:500;
|
||||||
}
|
}
|
||||||
|
.messagesContent
|
||||||
|
{
|
||||||
md-list-item .md-no-style.md-button, md-list-item.md-no-proxy.md-button {
|
padding-left: 4px;
|
||||||
font-size: inherit;
|
padding-right: 4px;
|
||||||
height: inherit;
|
margin: 5px;
|
||||||
text-align: left;
|
background-color: #f5f5f5;
|
||||||
text-transform: none;
|
overflow: scroll;
|
||||||
width: 300px;
|
height:250;
|
||||||
white-space: normal;
|
width:500;
|
||||||
}
|
}
|
||||||
|
p.tasksFeed
|
||||||
|
{
|
||||||
|
padding-left: 4px;
|
||||||
|
margin: 5px;
|
||||||
|
width:500;
|
||||||
|
height: auto;
|
||||||
|
background-color: aliceblue;
|
||||||
|
|
||||||
/*md-list-item, md-list-item .md-list-item-inner {
|
}
|
||||||
display: -webkit-flex;
|
p.messagesFeed
|
||||||
display: -ms-flexbox;
|
{
|
||||||
display: flex;
|
padding-left: 4px;
|
||||||
-webkit-justify-content: flex-start;
|
margin: 5px;
|
||||||
-ms-flex-pack: start;
|
width:500;
|
||||||
justify-content: flex-start;
|
height: auto;
|
||||||
-webkit-align-items: center;
|
background-color: #f5f5f5;
|
||||||
-ms-flex-align: center;
|
}
|
||||||
align-items: center;
|
|
||||||
min-height: 48px;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*End Effects for MD*/
|
|
|
@ -1,56 +1,50 @@
|
||||||
angular.module('SeHub')
|
angular.module('SeHub')
|
||||||
.controller('homeController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
|
.controller('homeController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
|
||||||
{
|
{
|
||||||
|
$scope.isStudent = false;
|
||||||
|
$scope.addMsg = false;
|
||||||
|
$scope.msgToPost = "";
|
||||||
|
$scope.oldText = "";
|
||||||
|
|
||||||
var imagePath = $scope.user.avatar_url;
|
var imagePath = $scope.user.avatar_url;
|
||||||
$scope.phones = [
|
$scope.phones = [
|
||||||
{ type: 'Home', number: '(972) 865-82861' },
|
{ type: 'Home', number: '(972) 865-82861' },
|
||||||
{ type: 'Cell', number: '(972) 5251-32309' },
|
{ type: 'Cell', number: '(972) 5251-32309' },
|
||||||
];
|
];
|
||||||
|
|
||||||
$scope.messages = [
|
if($scope.user.isLecturer)
|
||||||
{
|
{
|
||||||
face : imagePath,
|
$scope.isStudent = false;
|
||||||
what: 'Let me tell you a secret',
|
console.log("Lecturer Mode!");
|
||||||
who: 'Sagi Dayan',
|
|
||||||
when: '4:15PM',
|
|
||||||
notes: " I am S'ein"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
face : imagePath,
|
|
||||||
what: 'Listen to this!',
|
|
||||||
who: 'Aran Zaiger',
|
|
||||||
when: '6:15PM',
|
|
||||||
notes: " I am gaylord ultima!!"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
face : imagePath,
|
|
||||||
what: 'Hi?',
|
|
||||||
who: 'Etye Meyer',
|
|
||||||
when: '7:45AM',
|
|
||||||
notes: " I am mega gaylord ultima"
|
|
||||||
}
|
}
|
||||||
];
|
else
|
||||||
|
|
||||||
$scope.tasks = [
|
|
||||||
{
|
{
|
||||||
ExNum: '1',
|
$scope.isStudent = true;
|
||||||
dueDate: '23/06/15',
|
console.log("Student Mode!");
|
||||||
notes: " Build A Game: Scrabble"
|
}
|
||||||
},
|
|
||||||
|
$scope.addMessageClicked = function()
|
||||||
{
|
{
|
||||||
ExNum: '3',
|
$scope.addMsg = true; // Reveal the "POST" Button
|
||||||
dueDate: '30/06/15',
|
}
|
||||||
notes: " Static Array"
|
|
||||||
},
|
$scope.postMessageClicked = function(msg) // Posting the message itself
|
||||||
{
|
{
|
||||||
ExNum: '4',
|
if(msg != null)
|
||||||
dueDate: '07/07/15',
|
{
|
||||||
notes: " Dynamic Array"
|
$scope.prevText = "- " + msg;
|
||||||
},
|
implementText = document.getElementById("msg").value;
|
||||||
];
|
$scope.prevText += "<br></br>";
|
||||||
|
document.getElementById("bindText").innerHTML += $scope.prevText;
|
||||||
|
}
|
||||||
|
document.getElementById("msg").value = '';
|
||||||
|
$scope.prevText = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.clearAllClicked = function() // Clear Screen from text
|
||||||
|
{
|
||||||
|
document.getElementById("bindText").innerHTML = "";
|
||||||
|
}
|
||||||
|
|
||||||
// animation
|
// animation
|
||||||
$scope.isEnterd = top.setIsEnterd;
|
$scope.isEnterd = top.setIsEnterd;
|
||||||
|
|
|
@ -83,7 +83,7 @@ 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)); // Pop-up alert for e-mail verification
|
.ariaLabel('Email verification alert dialog').ok('Got it!').targetEvent(ev)); // Pop-up alert for e-mail verification
|
||||||
// TODO ADD delete cookies and redirect only after pressed 'Got it'
|
// TODO ADD- delete cookies and redirect only after pressed 'Got it'
|
||||||
$cookieStore.remove("com.sehub.www"); // Removing the cookies
|
$cookieStore.remove("com.sehub.www"); // Removing the cookies
|
||||||
$window.location.href = 'http://se-hub.appspot.com'; // Reference to 'welcome' page
|
$window.location.href = 'http://se-hub.appspot.com'; // Reference to 'welcome' page
|
||||||
}).error(function()
|
}).error(function()
|
||||||
|
@ -117,8 +117,6 @@ angular.module('SeHub')
|
||||||
var result = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
|
var result = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
|
||||||
if (!result.test(email)) // TODO Fix when success to show mdDialog until 'Got it' clicked
|
if (!result.test(email)) // TODO Fix when success to show mdDialog until 'Got it' clicked
|
||||||
{
|
{
|
||||||
console.log(email + ", Error in email, should alert");
|
|
||||||
// alert('Please provide a valid e-mail address');
|
|
||||||
$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.')
|
||||||
.ariaLabel('Email verification error alert dialog').ok('Got it!').targetEvent(email));
|
.ariaLabel('Email verification error alert dialog').ok('Got it!').targetEvent(email));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,52 +22,93 @@
|
||||||
</div>
|
</div>
|
||||||
</md-card>
|
</md-card>
|
||||||
</md-content>
|
</md-content>
|
||||||
|
<div ng-if="user.isLecturer"> <!-- Lecturer Mode -->
|
||||||
<md-content layout-padding>
|
<md-content layout-padding>
|
||||||
|
<div layout="row" layout-margin layout-padding>
|
||||||
|
<div>
|
||||||
<md-card>
|
<md-card>
|
||||||
<div class = "feed">
|
<p class = "messagesFeed">Messages</p>
|
||||||
<md-grid-list
|
|
||||||
md-cols-sm="1" md-cols-md="2" md-cols-gt-md="6"
|
|
||||||
md-row-height-gt-md="1:1" md-row-height="2:2"
|
|
||||||
md-gutter="12px" md-gutter-gt-sm="8px" >
|
|
||||||
<md-grid-tile class="aliceblue"
|
|
||||||
md-rowspan="2" md-colspan="3" md-colspan-sm="1">
|
|
||||||
<md-grid-tile-header>
|
|
||||||
<h3>Messages</h3>
|
|
||||||
</md-grid-tile-header>
|
|
||||||
In The Future Will Enter Wanted MESSAGES Text Here
|
|
||||||
</md-grid-tile>
|
|
||||||
<md-grid-tile class="gray"
|
|
||||||
md-rowspan="2" md-colspan="3" md-colspan-sm="1">
|
|
||||||
<md-grid-tile-header>
|
|
||||||
<h3>Tasks</h3>
|
|
||||||
</md-grid-tile-header>
|
|
||||||
<!-- In The Future Will Enter Wanted TASKS Text Here -->
|
|
||||||
<div class = "tasksContent" style:"text-align= left;">
|
|
||||||
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
|
||||||
<br>=====================</br>
|
|
||||||
For Task 4 Press: <a href="http://localhost:8080/home#/home">Task #4</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</md-grid-tile>
|
|
||||||
</md-grid-list>
|
|
||||||
</div>
|
|
||||||
</md-card>
|
</md-card>
|
||||||
</md-content>
|
</div>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
<!-- <div layout="row" layout-fill style="padding-right: 320px;">
|
<p class = "tasksFeed">Tasks</p>
|
||||||
<md-whiteframe class="md-whiteframe-z4" layout layout-align="center center">
|
</md-card>
|
||||||
<span>.md-whiteframe-z4</span>
|
</div>
|
||||||
</md-whiteframe>
|
</div>
|
||||||
<md-whiteframe class="md-whiteframe-z5" layout layout-align="center center">
|
<div layout="row" layout-margin layout-padding>
|
||||||
<span>.md-whiteframe-z5</span>
|
<div>
|
||||||
</md-whiteframe>
|
<md-card>
|
||||||
</div> -->
|
<p id = "bindText" class = "messagesContent"></p>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
|
<p class = "tasksContent">
|
||||||
|
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 4 Press: <a href="http://localhost:8080/home#/home">Task #4</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 5 Press: <a href="http://localhost:8080/home#/home">Task #5</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 6 Press: <a href="http://localhost:8080/home#/home">Task #6</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 7 Press: <a href="http://localhost:8080/home#/home">Task #7</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 8 Press: <a href="http://localhost:8080/home#/home">Task #8</a>
|
||||||
|
</p>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div layout-margin layout padding>
|
||||||
|
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary">Add Message</md-button>
|
||||||
|
</div>
|
||||||
|
<div ng-if="addMsg">
|
||||||
|
<div layout = "row" layout-margin layout padding layout-align = "left center">
|
||||||
|
<md-button ng-click="postMessageClicked(msgToAdd)" ng class="md-raised md-primary">Post</md-button>
|
||||||
|
<md-button ng-click="clearAllClicked()" ng class="md-raised md-primary">Clear All</md-button>
|
||||||
|
</div>
|
||||||
|
<div class="port_spacer"></div>
|
||||||
|
<md-input-container>
|
||||||
|
<label> Write Your Desired Message Here And Press Post</label>
|
||||||
|
<input type="text" id="msg" md-maxlength="150" minlength="1" ng-model="msgToAdd" required>
|
||||||
|
</md-input-container>
|
||||||
|
</div>
|
||||||
|
</md-content>
|
||||||
|
</div>
|
||||||
|
<div ng-if="isStudent"> <!-- Student Mode -->
|
||||||
|
<md-content layout-padding>
|
||||||
|
<div layout="row" layout-margin layout-padding>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
|
<p class = "messagesFeed">Messages</p>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
|
<p class = "tasksFeed">Tasks</p>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div layout="row" layout-margin layout-padding>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
|
<p id = "bindText" class = "messagesContent"></p>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<md-card>
|
||||||
|
<p class = "tasksContent">
|
||||||
|
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 4 Press: <a href="http://localhost:8080/home#/home">Task #4</a>
|
||||||
|
<br></br>
|
||||||
|
For Task 5 Press: <a href="http://localhost:8080/home#/home">Task #5</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</md-content>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue