-DashBoard pattern and messages - fixed
-Project evaluation pattern - added
This commit is contained in:
parent
19aa25de2a
commit
1e6e3f24f2
8 changed files with 240 additions and 42 deletions
|
@ -380,6 +380,36 @@ body.noscroll
|
|||
padding: 20px;
|
||||
}
|
||||
|
||||
.projectExhibit
|
||||
{
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
margin: 5px;
|
||||
background-color: aliceblue;
|
||||
overflow: scroll;
|
||||
overflow-y: visible;
|
||||
height:250;
|
||||
width:300;
|
||||
}
|
||||
.projectDropDown
|
||||
{
|
||||
border: 10px;
|
||||
border-color: solid red;
|
||||
}
|
||||
|
||||
.addMessage
|
||||
{
|
||||
font-size: 2em;
|
||||
}
|
||||
.tasksContent
|
||||
{
|
||||
word-break: break-word;
|
||||
}
|
||||
.messagesContent .msgSent
|
||||
{
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.tasksContent
|
||||
{
|
||||
padding-left: 4px;
|
||||
|
@ -387,8 +417,9 @@ body.noscroll
|
|||
margin: 5px;
|
||||
background-color: aliceblue;
|
||||
overflow: scroll;
|
||||
overflow-y: visible;
|
||||
height:250;
|
||||
width:500;
|
||||
width:340;
|
||||
}
|
||||
.messagesContent
|
||||
{
|
||||
|
@ -398,13 +429,13 @@ body.noscroll
|
|||
background-color: #f5f5f5;
|
||||
overflow: scroll;
|
||||
height:250;
|
||||
width:500;
|
||||
width:690;
|
||||
}
|
||||
p.tasksFeed
|
||||
{
|
||||
padding-left: 4px;
|
||||
margin: 5px;
|
||||
width:500;
|
||||
width:340;
|
||||
height: auto;
|
||||
background-color: aliceblue;
|
||||
|
||||
|
@ -413,7 +444,7 @@ p.messagesFeed
|
|||
{
|
||||
padding-left: 4px;
|
||||
margin: 5px;
|
||||
width:500;
|
||||
width:690;
|
||||
height: auto;
|
||||
background-color: #f5f5f5;
|
||||
}
|
|
@ -45,6 +45,10 @@ app.config(['$routeProvider', '$locationProvider',
|
|||
.when('/tasks', {
|
||||
templateUrl: 'templates/views/tasks.html',
|
||||
controller: 'tasksController'
|
||||
})
|
||||
.when('/myClasses', {
|
||||
templateUrl: 'templates/views/myClasses.html',
|
||||
controller: 'myClassesController'
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -5,6 +5,7 @@ angular.module('SeHub')
|
|||
$scope.addMsg = false;
|
||||
$scope.msgToPost = "";
|
||||
$scope.oldText = "";
|
||||
$scope.messages = [];
|
||||
|
||||
var imagePath = $scope.user.avatar_url;
|
||||
$scope.phones = [
|
||||
|
@ -28,24 +29,37 @@ angular.module('SeHub')
|
|||
$scope.addMsg = true; // Reveal the "POST" Button
|
||||
}
|
||||
|
||||
$scope.postMessageClicked = function(msg) // Posting the message itself
|
||||
$scope.msg = {};
|
||||
$scope.postMessageClicked = function() // Posting the message itself
|
||||
{
|
||||
if(msg != null)
|
||||
if($scope.msg.msgToAdd != null)
|
||||
{
|
||||
$scope.prevText = "- " + msg;
|
||||
implementText = document.getElementById("msg").value;
|
||||
$scope.prevText += "<br></br>";
|
||||
document.getElementById("bindText").innerHTML += $scope.prevText;
|
||||
console.log($scope.msg.msgToAdd);
|
||||
$scope.messages.push({"text": $scope.msg.msgToAdd});
|
||||
}
|
||||
document.getElementById("msg").value = '';
|
||||
$scope.prevText = '';
|
||||
$scope.msg.msgToAdd = null;
|
||||
}
|
||||
|
||||
$scope.clearAllClicked = function() // Clear Screen from text
|
||||
{
|
||||
document.getElementById("bindText").innerHTML = "";
|
||||
$scope.messages = [];
|
||||
}
|
||||
|
||||
$scope.chooseCourseClicked = function()
|
||||
{
|
||||
console.log("choose course Clicked!!");
|
||||
|
||||
|
||||
}
|
||||
|
||||
$scope.chooseProjectClicked = function()
|
||||
{
|
||||
console.log("choose project Clicked!!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// animation
|
||||
$scope.isEnterd = top.setIsEnterd;
|
||||
}]);
|
|
@ -43,7 +43,7 @@ angular.module('SeHub')
|
|||
"title": "My Classes",
|
||||
"icon": "fa fa-graduation-cap",
|
||||
"style": "",
|
||||
"route": "/campuses"
|
||||
"route": "/myClasses"
|
||||
}, {
|
||||
"title": "My Projects",
|
||||
"icon": "fa fa-cube",
|
||||
|
|
|
@ -17,7 +17,6 @@ service.factory('apiService', ['$http', function($http) {
|
|||
req = {
|
||||
method : "GET",
|
||||
url : url
|
||||
|
||||
};
|
||||
return $http(req);
|
||||
},
|
||||
|
@ -26,13 +25,11 @@ service.factory('apiService', ['$http', function($http) {
|
|||
payload = {
|
||||
email: email
|
||||
};
|
||||
|
||||
req = {
|
||||
method: "POST",
|
||||
url: url,
|
||||
data: payload
|
||||
};
|
||||
|
||||
return $http(req);
|
||||
},
|
||||
updateUser: function(token, payLoad){
|
||||
|
@ -44,6 +41,33 @@ service.factory('apiService', ['$http', function($http) {
|
|||
data: payLoad
|
||||
};
|
||||
return $http(req);
|
||||
},
|
||||
getAllCourses: function(token){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAll/" + token;
|
||||
req = {
|
||||
method : "GET",
|
||||
url : url
|
||||
|
||||
};
|
||||
return $http(req);
|
||||
},
|
||||
getAllMessages: function(token){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAllMessages/" + token;
|
||||
req = {
|
||||
method : "GET",
|
||||
url : url
|
||||
|
||||
};
|
||||
return $http(req);
|
||||
},
|
||||
getCourseMessages: function(token, courseName){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCourseMessages/" + token + '/' + courseName;
|
||||
req = {
|
||||
method : "GET",
|
||||
url : url
|
||||
|
||||
};
|
||||
return $http(req);
|
||||
}
|
||||
};
|
||||
}]);
|
|
@ -1,8 +1,8 @@
|
|||
<div>
|
||||
<div layout-padding layout-margin>
|
||||
<div class="loader" ng-if="loadingData">
|
||||
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
||||
</div>
|
||||
<md-content layout-padding>
|
||||
<md-content >
|
||||
<md-card class="gray-font fadeOutUp" ng-if="isEnterd">
|
||||
<div layout="row">
|
||||
<div class="spacer"></div>
|
||||
|
@ -22,27 +22,55 @@
|
|||
</div>
|
||||
</md-card>
|
||||
</md-content>
|
||||
<md-content>
|
||||
<h1 style="margin-left:15px;"><i class="fa fa-dashboard"></i> Dash Board</h1>
|
||||
</md-content>
|
||||
<div ng-if="user.isLecturer"> <!-- Lecturer Mode -->
|
||||
<md-content layout-padding>
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div>
|
||||
<md-content>
|
||||
<div layout="row">
|
||||
<div flex="65">
|
||||
<md-card>
|
||||
<p class = "messagesFeed">Messages</p>
|
||||
</md-card>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="34">
|
||||
<md-card>
|
||||
<p class = "tasksFeed">Tasks</p>
|
||||
</md-card>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div>
|
||||
<div layout="row">
|
||||
<div flex="65">
|
||||
<md-card>
|
||||
<p id = "bindText" class = "messagesContent"></p>
|
||||
<div class = "messagesContent">
|
||||
<md-card ng-repeat = "msg in messages">
|
||||
<div layout="column">
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div flex="10" class="md-avatar">
|
||||
<img ng-src="{{user.avatar_url}}" style="width:100%">
|
||||
</div>
|
||||
<div flex>
|
||||
<div layout = "column">
|
||||
<div>
|
||||
<b>{{user.name}}</b>
|
||||
</div>
|
||||
<div>
|
||||
class_name
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="69" class="msgSent" layout-margin layout-padding>
|
||||
{{msg.text}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</md-card>
|
||||
</div>
|
||||
</md-card>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="34">
|
||||
<md-card>
|
||||
<p class = "tasksContent">
|
||||
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
||||
|
@ -60,43 +88,129 @@
|
|||
</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 class ="addMessage" layout-margin layout padding>
|
||||
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary"><i class="fa fa-comments"></i></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="postMessageClicked()" 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>
|
||||
<input type="text" minlength="1" ng-model="msg.msgToAdd" required>
|
||||
</md-input-container>
|
||||
</div>
|
||||
</md-content>
|
||||
|
||||
<md-content layout-padding layout-margin>
|
||||
<h1>
|
||||
<em><i class="fa fa-folder-open"></i> Project Evaluation</em>
|
||||
</h1>
|
||||
<md-select placeholder="Choose Project" ng-model="project" ng-click="chooseProjectClicked()" style="z-index: 300" class="projectDropDown">
|
||||
</md-select>
|
||||
<div layout = "column" layout-margin layout-padding>
|
||||
<div layout="row">
|
||||
<md-card flex class = "projectExhibit">
|
||||
a
|
||||
a
|
||||
a
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
s
|
||||
s
|
||||
s
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
d
|
||||
d
|
||||
d
|
||||
</md-card>
|
||||
</div>
|
||||
<div layout="row">
|
||||
<md-card flex class = "projectExhibit">
|
||||
e
|
||||
e
|
||||
e
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
q
|
||||
q
|
||||
q
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
w
|
||||
w
|
||||
w
|
||||
</md-card>
|
||||
</div>
|
||||
<div layout="row">
|
||||
<md-card flex class = "projectExhibit">
|
||||
b
|
||||
b
|
||||
b
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
r
|
||||
r
|
||||
r
|
||||
</md-card>
|
||||
<md-card flex class = "projectExhibit">
|
||||
x
|
||||
x
|
||||
x
|
||||
</md-card>
|
||||
</div>
|
||||
</div>
|
||||
</md-content>
|
||||
</div>
|
||||
<div ng-if="isStudent"> <!-- Student Mode -->
|
||||
<md-content layout-padding>
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div>
|
||||
<md-content>
|
||||
<div layout="row">
|
||||
<div flex="65">
|
||||
<md-card>
|
||||
<p class = "messagesFeed">Messages</p>
|
||||
</md-card>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="34">
|
||||
<md-card>
|
||||
<p class = "tasksFeed">Tasks</p>
|
||||
</md-card>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div>
|
||||
<div layout="row">
|
||||
<div flex="65">
|
||||
<md-card>
|
||||
<p id = "bindText" class = "messagesContent"></p>
|
||||
<div class = "messagesContent">
|
||||
<md-card ng-repeat = "msg in messages">
|
||||
<div layout="column">
|
||||
<div layout="row" layout-margin layout-padding>
|
||||
<div flex="10" class="md-avatar">
|
||||
<img ng-src="{{user.avatar_url}}" style="width:100%">
|
||||
</div>
|
||||
<div flex>
|
||||
<div layout = "column">
|
||||
<div>
|
||||
<b>{{user.name}}</b>
|
||||
</div>
|
||||
<div>
|
||||
class_name
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="69" class="msgSent" layout-margin layout-padding>
|
||||
{{msg.text}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</md-card>
|
||||
</div>
|
||||
</md-card>
|
||||
</div>
|
||||
<div>
|
||||
<div flex="34">
|
||||
<md-card>
|
||||
<p class = "tasksContent">
|
||||
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
||||
|
@ -104,11 +218,20 @@
|
|||
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>
|
||||
<!-- <md-button ng-click="chooseCourseClicked()" ng class="md-raised md-primary">Choose Course</md-button> -->
|
||||
<md-select placeholder="Choose Course" ng-model="course" ng-click="chooseCourseClicked()" style="z-index: 300">
|
||||
<!-- <md-option ng-switch="user.isLecturer" ng-repeat="c in courses" value="{{c.title}}">{{c.title}}</md-option> -->
|
||||
</md-select>
|
||||
</md-content>
|
||||
</div>
|
||||
</div>
|
|
@ -100,6 +100,8 @@
|
|||
<script src="templates/js/controllers/homeController.js"></script>
|
||||
<script src="templates/js/controllers/settingsController.js"></script>
|
||||
<script src="templates/js/controllers/registerController.js"></script>
|
||||
<script src="templates/js/controllers/tasksController.js"></script>
|
||||
<script src="templates/js/controllers/myClassesController.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -19,7 +19,7 @@
|
|||
<div layout="row" layout-align="center center">
|
||||
<p>Are You A Lecturer?</p>
|
||||
<md-switch ng-model="user.isLecturer" aria-label="Switch 1">
|
||||
</md-switch>
|
||||
</md-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<div class = "dropDown">
|
||||
<md-select placeholder="Pick your Campus" ng-model="campus" style="z-index: 300" ng-change="dropdownClicked()">
|
||||
<md-option ng-switch="user.isLecturer" ng-repeat="c in campuses" value="{{c.title}}">{{c.title}}</md-option>
|
||||
</md-select>
|
||||
</md-select>
|
||||
</div>
|
||||
</div>
|
||||
<div layout="col" layout-align="center center">
|
||||
|
|
Loading…
Reference in a new issue