- create course - added
- show my classes - added
This commit is contained in:
parent
5a118075c4
commit
1d5655b056
6 changed files with 42 additions and 8 deletions
|
@ -57,6 +57,10 @@ app.config(['$routeProvider', '$locationProvider',
|
|||
.when('/projects', {
|
||||
templateUrl: 'templates/views/projects.html',
|
||||
controller: 'projectsController'
|
||||
})
|
||||
.when('/newCourse', {
|
||||
templateUrl: 'templates/views/newCourse.html',
|
||||
controller: 'newCourseController'
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -6,17 +6,28 @@ angular.module('SeHub')
|
|||
$scope.msgToPost = "";
|
||||
$scope.oldText = "";
|
||||
$scope.messages = [];
|
||||
$scope.msg = {};
|
||||
|
||||
$rootScope.seToken = $cookies['com.sehub.www'];
|
||||
var token = $rootScope.seToken;
|
||||
|
||||
var imagePath = $scope.user.avatar_url;
|
||||
//var campusName = '';
|
||||
$scope.course = '';
|
||||
// $scope.campusName = '';
|
||||
|
||||
$scope.phones = [
|
||||
{ type: 'Home', number: '(972) 865-82861' },
|
||||
{ type: 'Cell', number: '(972) 5251-32309' },
|
||||
];
|
||||
|
||||
|
||||
|
||||
if($scope.user.isLecturer)
|
||||
{
|
||||
$scope.isStudent = false;
|
||||
console.log("Lecturer Mode!");
|
||||
// console.log($scope.campusName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -24,12 +35,20 @@ angular.module('SeHub')
|
|||
console.log("Student Mode!");
|
||||
}
|
||||
|
||||
// apiService.getCourseByCampusName($scope.user.classes_id_list[0]).success(function(data)
|
||||
// {
|
||||
// console.log("Campus Name is ON! " + $scope.user.classes_id_list[0])
|
||||
// $scope.course = data;
|
||||
// }).error(function()
|
||||
// {
|
||||
// console.log("Error on ===> getCourseByCampusName")
|
||||
// });
|
||||
|
||||
|
||||
$scope.addMessageClicked = function()
|
||||
{
|
||||
$scope.addMsg = true; // Reveal the "POST" Button
|
||||
}
|
||||
|
||||
$scope.msg = {};
|
||||
$scope.postMessageClicked = function() // Posting the message itself
|
||||
{
|
||||
if($scope.msg.msgToAdd != null)
|
||||
|
@ -48,14 +67,11 @@ angular.module('SeHub')
|
|||
$scope.chooseCourseClicked = function()
|
||||
{
|
||||
console.log("choose course Clicked!!");
|
||||
|
||||
|
||||
}
|
||||
|
||||
$scope.chooseProjectClicked = function()
|
||||
{
|
||||
console.log("choose project Clicked!!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ angular.module('SeHub')
|
|||
if($scope.user.name === ";")
|
||||
{
|
||||
$scope.user.name = "";
|
||||
$scope.user.name = $scope.user.username
|
||||
$scope.user.name = $scope.user.username;
|
||||
$scope.userHasNoName = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
var DEBUG = true;
|
||||
|
||||
var service = angular.module('seHub.services', []);
|
||||
|
@ -42,6 +43,16 @@ service.factory('apiService', ['$http', function($http) {
|
|||
};
|
||||
return $http(req);
|
||||
},
|
||||
getCourseByCampusName: function(token){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAll/" + token;
|
||||
req = {
|
||||
method : "GET",
|
||||
url : url,
|
||||
data: token
|
||||
|
||||
};
|
||||
return $http(req);
|
||||
},
|
||||
getAllCourses: function(token){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAll/" + token;
|
||||
req = {
|
||||
|
|
|
@ -88,8 +88,10 @@
|
|||
</md-card>
|
||||
</div>
|
||||
</div>
|
||||
<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 class ="addMessage" layout="row" layout-margin layout padding>
|
||||
<div>
|
||||
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary"><i class="fa fa-comments"></i></md-button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="addMsg">
|
||||
<div layout = "row" layout-margin layout padding layout-align = "left center">
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
<script src="templates/js/controllers/myClassesController.js"></script>
|
||||
<script src="templates/js/controllers/newTasksController.js"></script>
|
||||
<script src="templates/js/controllers/projectsController.js"></script>
|
||||
<script src="templates/js/controllers/newCourseController.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue