Merge branch 'master' of https://github.com/sagidayan/SE-Hub into API_Dev
|
@ -125,3 +125,61 @@ def notify_se_hub_campus_request(campus, campus_name):
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
message.send()
|
message.send()
|
||||||
|
|
||||||
|
|
||||||
|
def send_task_reminder( email, name, task_name, course_name):
|
||||||
|
message = mail.EmailMessage(sender="SE-Hub Support <se-hub@appspot.gserviceaccount.com>",
|
||||||
|
subject="Hey! Due Date for task " + task_name + " is TOMORROW!")
|
||||||
|
|
||||||
|
message.to = email
|
||||||
|
|
||||||
|
message.body = """
|
||||||
|
Dear """+name+""":
|
||||||
|
|
||||||
|
You Have A Task that Due tomorrow! don't forget to submit the task.
|
||||||
|
|
||||||
|
Task name: """ + task_name + """ \n
|
||||||
|
In Course: """ + course_name + """ \n\n
|
||||||
|
|
||||||
|
|
||||||
|
http://se-hub.appspot.com
|
||||||
|
|
||||||
|
|
||||||
|
Please let us know if you have any questions.
|
||||||
|
|
||||||
|
SE-Hub (c) 2015 niptop Team.
|
||||||
|
"""
|
||||||
|
|
||||||
|
message.html = """
|
||||||
|
<html><head></head><body>
|
||||||
|
<div>
|
||||||
|
<center>
|
||||||
|
<img src='https://cloud.githubusercontent.com/assets/2984053/6825467/7c9d0402-d303-11e4-9827-62a6d66f937a.png'>
|
||||||
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
<div style='width:70%'>
|
||||||
|
<h3>Dear """+name+""":</h3>
|
||||||
|
|
||||||
|
<center>
|
||||||
|
<img src='https://pixabay.com/static/uploads/photo/2014/03/05/07/54/reminder-279903_640.png'>
|
||||||
|
</center>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
You Have A Task that Due tomorrow! don't forget to submit the task.<br>
|
||||||
|
|
||||||
|
Task name: """ + task_name + """ <br>
|
||||||
|
In Course: """ + course_name + """ <br>
|
||||||
|
<br>
|
||||||
|
<a href='http://se-hub.appspot.com/'>SE - Hub</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
Please let us know if you have any questions.
|
||||||
|
<br>
|
||||||
|
SE-Hub (c) 2015 niptop Team.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
|
||||||
|
message.send()
|
||||||
|
|
|
@ -403,7 +403,7 @@ def getAllFutureTasks(token):
|
||||||
<br>
|
<br>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
user = get_user_by_token
|
user = get_user_by_token(token)
|
||||||
if user is None:
|
if user is None:
|
||||||
return bad_request("Bad User Token")
|
return bad_request("Bad User Token")
|
||||||
|
|
||||||
|
|
BIN
templates/android-icon-144x144.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
templates/android-icon-192x192.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
templates/android-icon-36x36.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
templates/android-icon-48x48.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
templates/android-icon-72x72.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
templates/android-icon-96x96.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
templates/apple-icon-114x114.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
templates/apple-icon-120x120.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
templates/apple-icon-144x144.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
templates/apple-icon-152x152.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
templates/apple-icon-180x180.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
templates/apple-icon-57x57.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
templates/apple-icon-60x60.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
templates/apple-icon-72x72.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
templates/apple-icon-76x76.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
templates/apple-icon-precomposed.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
templates/apple-icon.png
Normal file
After Width: | Height: | Size: 21 KiB |
2
templates/browserconfig.xml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig><msapplication><tile><square70x70logo src="templates/ms-icon-70x70.png"/><square150x150logo src="templates/ms-icon-150x150.png"/><square310x310logo src="templates/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
|
@ -127,6 +127,10 @@ body.noscroll
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.center_all{
|
||||||
|
margin:auto;
|
||||||
|
}
|
||||||
|
|
||||||
.mail_suffix
|
.mail_suffix
|
||||||
{
|
{
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
|
|
BIN
templates/favicon-16x16.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
templates/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
templates/favicon-96x96.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
templates/favicon.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,6 +1,23 @@
|
||||||
|
|
||||||
<html lang="en" >
|
<html lang="en" >
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="apple-touch-icon" sizes="57x57" href="templates/apple-icon-57x57.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="60x60" href="templates/apple-icon-60x60.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="72x72" href="templates/apple-icon-72x72.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="templates/apple-icon-76x76.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="114x114" href="templates/apple-icon-114x114.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="templates/apple-icon-120x120.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="144x144" href="templates/apple-icon-144x144.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="templates/apple-icon-152x152.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="templates/apple-icon-180x180.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="192x192" href="templates/android-icon-192x192.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="templates/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="96x96" href="templates/favicon-96x96.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="templates/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="templates/manifest.json">
|
||||||
|
<meta name="msapplication-TileColor" content="#ffffff">
|
||||||
|
<meta name="msapplication-TileImage" content="templates/ms-icon-144x144.png">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/0.8.3/angular-material.min.css">
|
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/0.8.3/angular-material.min.css">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:300,400,500,700,400italic">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:300,400,500,700,400italic">
|
||||||
|
|
||||||
|
|
|
@ -48,11 +48,11 @@ app.config(['$routeProvider', '$locationProvider',
|
||||||
templateUrl: 'templates/views/newTask.html',
|
templateUrl: 'templates/views/newTask.html',
|
||||||
controller: 'newTasksController'
|
controller: 'newTasksController'
|
||||||
})
|
})
|
||||||
.when('/tasks/overview/:taskId/:submitterId', {
|
.when('/tasks/overview/:taskId/:submitterId/:gId', {
|
||||||
templateUrl: 'templates/views/task.html',
|
templateUrl: 'templates/views/task.html',
|
||||||
controller: 'taskController'
|
controller: 'taskController'
|
||||||
})
|
})
|
||||||
.when('/tasks/fill/:taskId', {
|
.when('/tasks/fill/:taskId/:gId', {
|
||||||
templateUrl: 'templates/views/task.html',
|
templateUrl: 'templates/views/task.html',
|
||||||
controller: 'taskController'
|
controller: 'taskController'
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,6 +8,7 @@ angular.module('SeHub')
|
||||||
$scope.oldText = "";
|
$scope.oldText = "";
|
||||||
$scope.messages = [];
|
$scope.messages = [];
|
||||||
$scope.userMessages = [];
|
$scope.userMessages = [];
|
||||||
|
$scope.userTasks = [];
|
||||||
$scope.messagesDisplay = [];
|
$scope.messagesDisplay = [];
|
||||||
$scope.courses = [];
|
$scope.courses = [];
|
||||||
$scope.campuses = [];
|
$scope.campuses = [];
|
||||||
|
@ -32,7 +33,7 @@ angular.module('SeHub')
|
||||||
{
|
{
|
||||||
apiService.getAllUserMessages(token).success(function(data)
|
apiService.getAllUserMessages(token).success(function(data)
|
||||||
{
|
{
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
$scope.userMessages = data;
|
$scope.userMessages = data;
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +41,7 @@ angular.module('SeHub')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.displayMessages(); //
|
// $scope.displayMessages(); //
|
||||||
|
|
||||||
$scope.addMessageClicked = function()
|
$scope.addMessageClicked = function()
|
||||||
{
|
{
|
||||||
|
@ -64,10 +65,10 @@ angular.module('SeHub')
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
console.log("Error Below");
|
console.log("Error Below");
|
||||||
console.log(err);
|
console.log(err.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.messages.push({"text": $scope.msg.msgToAdd});
|
$scope.userMessages.push({"text": $scope.msg.msgToAdd});
|
||||||
$location.path('/home/');
|
$location.path('/home/');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -78,25 +79,54 @@ angular.module('SeHub')
|
||||||
$scope.msg.msgToAdd = null;
|
$scope.msg.msgToAdd = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.gotoTask = function(task)
|
||||||
|
{
|
||||||
|
console.log(task);
|
||||||
|
if(task.isPersonal)
|
||||||
|
{
|
||||||
|
$location.path('/tasks/fill/' + task.id + '/' + $scope.user.id);
|
||||||
|
}
|
||||||
|
else // it's a project task
|
||||||
|
{
|
||||||
|
apiService.getProjectsByCourse(token, task.courseId).success(function(data)
|
||||||
|
{
|
||||||
|
console.log($scope.user);
|
||||||
|
for(var i = 0; i < $scope.user.projects_id_list.length; i++)
|
||||||
|
for(var j = 0; j < data.length; j++)
|
||||||
|
{
|
||||||
|
if($scope.user.projects_id_list[i] === data[j])
|
||||||
|
{
|
||||||
|
$location.path('/tasks/fill/' + task.id + '/' + data[j].id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).error(function(err)
|
||||||
|
{
|
||||||
|
console.log(err.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$scope.displayTasks = function()
|
$scope.displayTasks = function()
|
||||||
{
|
{
|
||||||
apiService.getAllUserTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
||||||
{
|
{
|
||||||
$scope.tasks = data;
|
$scope.userTasks = data;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
|
console.log(err.message);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// apiService.getAllFutureTasks(token, courseId).success(function(data) // need to check courseId
|
$scope.getProjects = function(courseId)
|
||||||
// {
|
{
|
||||||
// console.log("YE");
|
apiService.getProjectsByCourse(token, courseId).success(function(data)
|
||||||
// }).error(function(err)
|
{
|
||||||
// {
|
return data;
|
||||||
// console.log("Error: " + err.message);
|
}).error(function(err)
|
||||||
// });
|
{
|
||||||
|
console.log(err.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.getCampuses = function()
|
$scope.getCampuses = function()
|
||||||
|
@ -105,13 +135,13 @@ angular.module('SeHub')
|
||||||
{
|
{
|
||||||
$scope.campuses = data;
|
$scope.campuses = data;
|
||||||
$scope.getCourses(); // Get all the courses info
|
$scope.getCourses(); // Get all the courses info
|
||||||
if($scope.messages)
|
if($scope.userMessages)
|
||||||
{
|
{
|
||||||
//$scope.displayMessages(); // // Display all messages in message feed and the latest one
|
//$scope.displayMessages(); // // Display all messages in message feed and the latest one
|
||||||
}
|
}
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
console.log("Error: " + err.message);
|
console.log(err.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -157,25 +187,6 @@ angular.module('SeHub')
|
||||||
console.log($scope.courseObj);
|
console.log($scope.courseObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// $scope.chooseCourseClicked = function()
|
|
||||||
// {
|
|
||||||
// console.log("Click ");
|
|
||||||
// console.log($scope.choosenCourse);
|
|
||||||
// if($scope.choosenCourse)
|
|
||||||
// {
|
|
||||||
// console.log("here");
|
|
||||||
// $scope.courseObj = null;
|
|
||||||
// for(var i = 0; i < $scope.courses.length; i++)
|
|
||||||
// {
|
|
||||||
// if($scope.courses[i].courseName === $scope.choosenCourse)
|
|
||||||
// {
|
|
||||||
// $scope.courseObj = $scope.courses[i];
|
|
||||||
// console.log($scope.courseObj);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
$scope.chooseProjectClicked = function()
|
$scope.chooseProjectClicked = function()
|
||||||
{
|
{
|
||||||
console.log("choose project Clicked!!");
|
console.log("choose project Clicked!!");
|
||||||
|
@ -184,8 +195,13 @@ angular.module('SeHub')
|
||||||
$scope.getCampuses(); // Get all the campuses info
|
$scope.getCampuses(); // Get all the campuses info
|
||||||
|
|
||||||
// animation
|
// animation
|
||||||
|
if($scope.userMessages)
|
||||||
|
{
|
||||||
|
$scope.displayMessages(); // // Display all messages in message feed and the latest one
|
||||||
|
}
|
||||||
// $scope.displayMessages();
|
// $scope.displayMessages();
|
||||||
$scope.displayTasks(); // Display all tasks in task feed and the latest one
|
$scope.displayTasks(); // Display all tasks in task feed and the latest one
|
||||||
|
// $scope.getProjects(); // Get all projects info
|
||||||
$scope.isEnterd = top.setIsEnterd;
|
$scope.isEnterd = top.setIsEnterd;
|
||||||
|
|
||||||
}]);
|
}]);
|
|
@ -52,7 +52,6 @@ angular.module('SeHub')
|
||||||
}];
|
}];
|
||||||
|
|
||||||
dataService.initService($scope); //Start Data Sync Service (For User)
|
dataService.initService($scope); //Start Data Sync Service (For User)
|
||||||
console.log(data);
|
|
||||||
if ($scope.user.isFirstLogin) {
|
if ($scope.user.isFirstLogin) {
|
||||||
$scope.menuObj = {};
|
$scope.menuObj = {};
|
||||||
$scope.isInRegisterMode = true;
|
$scope.isInRegisterMode = true;
|
||||||
|
|
|
@ -51,7 +51,7 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
|
||||||
console.error(err);
|
console.error(err);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
alert('Fill All Shit!');
|
alert('Please Fill All Task info & At least one component');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
|
||||||
return false;
|
return false;
|
||||||
if (!$scope.task.date)
|
if (!$scope.task.date)
|
||||||
return false;
|
return false;
|
||||||
|
if ($scope.task.components.length < 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +133,7 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
|
||||||
$scope.compDetails = [{
|
$scope.compDetails = [{
|
||||||
detail: "Label"
|
detail: "Label"
|
||||||
}, {
|
}, {
|
||||||
detail: "URL Path"
|
detail: "URL Path (You Need To Include 'http://'"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
if (type === 'radiobuttons')
|
if (type === 'radiobuttons')
|
||||||
|
|
|
@ -6,12 +6,24 @@ angular.module('SeHub')
|
||||||
|
|
||||||
var taskId = $routeParams.taskId;
|
var taskId = $routeParams.taskId;
|
||||||
var submitterId = $routeParams.submitterId;
|
var submitterId = $routeParams.submitterId;
|
||||||
|
var token = $cookies['com.sehub.www'];
|
||||||
|
var groupId = $routeParams.gId;
|
||||||
|
$scope.loading = true;
|
||||||
|
|
||||||
|
apiService.getTaskById(token, taskId, groupId).success(function(data) {
|
||||||
|
$scope.task = data;
|
||||||
|
$scope.dateInit($scope.task.dueDate);
|
||||||
|
$scope.loading = false;
|
||||||
|
}).error(function(err) {
|
||||||
|
$location.path('/tasks');
|
||||||
|
})
|
||||||
|
|
||||||
if (submitterId) { //In This Case we Only Want to show The Content of the Submitter
|
if (submitterId) { //In This Case we Only Want to show The Content of the Submitter
|
||||||
$scope.readOnly = true;
|
$scope.readOnly = true;
|
||||||
|
|
||||||
} else { //In This Case We Need An Empty Task To Be Able To Fill It
|
} else { //In This Case We Need An Empty Task To Be Able To Fill It
|
||||||
$scope.readOnly = false;
|
$scope.readOnly = false;
|
||||||
|
apiService.getTaskById(token, taskId, groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.dateInit = function(date) {
|
$scope.dateInit = function(date) {
|
||||||
|
@ -61,8 +73,23 @@ angular.module('SeHub')
|
||||||
|
|
||||||
$scope.submitTask = function(event) { //Dialog will pop-up if not all mandatory fields are filled
|
$scope.submitTask = function(event) { //Dialog will pop-up if not all mandatory fields are filled
|
||||||
if (validateComponents()) {
|
if (validateComponents()) {
|
||||||
alert('All Shit Are Filled');
|
apiService.submitTask(token, taskId, groupId, $scope.task.components).success(function(data) {
|
||||||
return;
|
$mdDialog.show(
|
||||||
|
$mdDialog.alert()
|
||||||
|
.title('Submitted!')
|
||||||
|
.content('Your Task Was Successfully Submitted!')
|
||||||
|
.ariaLabel('ddd')
|
||||||
|
.ok('GoTo My Submitted Task')
|
||||||
|
.then(function(dd){
|
||||||
|
if($scope.task.isPersonal)
|
||||||
|
$location.path('/tasks/overview/'+taskId+'/'+groupId+'/'+groupId);
|
||||||
|
else
|
||||||
|
$location.path('/tasks/overview/'+taskId+'/'+groupId+'/'+groupId);
|
||||||
|
})
|
||||||
|
.targetEvent(event)
|
||||||
|
);
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
$mdDialog.show(
|
$mdDialog.show(
|
||||||
$mdDialog.alert()
|
$mdDialog.alert()
|
||||||
|
@ -81,35 +108,35 @@ angular.module('SeHub')
|
||||||
= Mock Data =
|
= Mock Data =
|
||||||
=================================*/
|
=================================*/
|
||||||
|
|
||||||
$scope.task = {
|
// $scope.task = {
|
||||||
"title": "task1",
|
// "title": "task1",
|
||||||
"courseId": 1234567890,
|
// "courseId": 1234567890,
|
||||||
"description": "one line\nsecondline\nthirdline",
|
// "description": "one line\nsecondline\nthirdline",
|
||||||
"dueDate": {
|
// "dueDate": {
|
||||||
"year": 2010,
|
// "year": 2010,
|
||||||
"month": 2,
|
// "month": 2,
|
||||||
"day": 4
|
// "day": 4
|
||||||
},
|
// },
|
||||||
"isPersonal": true,
|
// "isPersonal": true,
|
||||||
"components": [{
|
// "components": [{
|
||||||
"type": "radiobuttons",
|
// "type": "radiobuttons",
|
||||||
"label": "pick One|this|orthis|MaybeThis",
|
// "label": "pick One|this|orthis|MaybeThis",
|
||||||
"isMandatory": true,
|
// "isMandatory": true,
|
||||||
"order": 1
|
// "order": 1
|
||||||
}, {
|
// }, {
|
||||||
"type": "checkbox",
|
// "type": "checkbox",
|
||||||
"label": "tick Me",
|
// "label": "tick Me",
|
||||||
"isMandatory": true,
|
// "isMandatory": true,
|
||||||
"order": 2
|
// "order": 2
|
||||||
}, {
|
// }, {
|
||||||
"type": "textarea",
|
// "type": "textarea",
|
||||||
"label": "fill shit",
|
// "label": "fill shit",
|
||||||
"isMandatory": false,
|
// "isMandatory": false,
|
||||||
"order": 3
|
// "order": 3
|
||||||
}]
|
// }]
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
$scope.dateInit($scope.task.dueDate);
|
|
||||||
|
|
||||||
$scope.dueTime = function() {
|
$scope.dueTime = function() {
|
||||||
if (!$scope.task.date || $scope.task.date === '')
|
if (!$scope.task.date || $scope.task.date === '')
|
||||||
|
|
|
@ -1,14 +1,32 @@
|
||||||
angular.module('SeHub')
|
angular.module('SeHub')
|
||||||
.controller('tasksController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
|
.controller('tasksController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
|
||||||
{
|
{
|
||||||
console.log("in controller");
|
$scope.lecturerTasks = [];
|
||||||
|
$rootScope.seToken = $cookies['com.sehub.www'];
|
||||||
|
var token = $rootScope.seToken;
|
||||||
|
|
||||||
$scope.createTaskClicked = function()
|
$scope.createTaskClicked = function()
|
||||||
{
|
{
|
||||||
$location.path("/tasks/new"); // Reference to 'newTask' page
|
$location.path("/tasks/new"); // Reference to 'newTask' page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.displayTasks = function()
|
||||||
|
{
|
||||||
|
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
||||||
|
{
|
||||||
|
$scope.lecturerTasks = data;
|
||||||
|
console.log(data);
|
||||||
|
}).error(function(err)
|
||||||
|
{
|
||||||
|
console.log(err.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$scope.gotoTask = function(taskId)
|
||||||
|
{
|
||||||
|
$location.path('/tasks/fill/' + taskId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.displayTasks(); // Calling tasks with task id
|
||||||
|
|
||||||
|
|
||||||
}]);
|
}]);
|
|
@ -197,8 +197,8 @@ service.factory('apiService', ['$http', function($http) {
|
||||||
};
|
};
|
||||||
return $http(req);
|
return $http(req);
|
||||||
},
|
},
|
||||||
getAllFutureTasks: function(token, courseId){
|
getAllFutureTasks: function(token){
|
||||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureCampusTasks/" + token + "/" + courseId;
|
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureTasks/" + token;
|
||||||
req = {
|
req = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: url
|
url: url
|
||||||
|
@ -245,6 +245,24 @@ service.factory('apiService', ['$http', function($http) {
|
||||||
url: url
|
url: url
|
||||||
};
|
};
|
||||||
return $http(req);
|
return $http(req);
|
||||||
|
},
|
||||||
|
getTaskById: function(token, taskId, ownerId){
|
||||||
|
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getTaskById/" + token + "/" + taskId + "/" + ownerId;
|
||||||
|
var req = {
|
||||||
|
method: 'GET',
|
||||||
|
url: url
|
||||||
|
};
|
||||||
|
return $http(req);
|
||||||
|
|
||||||
|
},
|
||||||
|
submitTask: function(token, taskId, ownerId, payload){
|
||||||
|
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/submitTask/" + token + '/' + taskId + '/' + ownerId;
|
||||||
|
req = {
|
||||||
|
method: 'POST',
|
||||||
|
data: payload,
|
||||||
|
url: url
|
||||||
|
};
|
||||||
|
return $http(req);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
41
templates/manifest.json
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"name": "App",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-36x36.png",
|
||||||
|
"sizes": "36x36",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "0.75"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-48x48.png",
|
||||||
|
"sizes": "48x48",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-72x72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "1.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-96x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "2.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-144x144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "3.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "\/android-icon-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image\/png",
|
||||||
|
"density": "4.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
BIN
templates/ms-icon-144x144.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
templates/ms-icon-150x150.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
templates/ms-icon-310x310.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
templates/ms-icon-70x70.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
|
@ -25,123 +25,64 @@
|
||||||
<md-content>
|
<md-content>
|
||||||
<h1 style="margin-left:15px;"><i class="fa fa-dashboard"></i> Dash Board</h1>
|
<h1 style="margin-left:15px;"><i class="fa fa-dashboard"></i> Dash Board</h1>
|
||||||
</md-content>
|
</md-content>
|
||||||
|
|
||||||
<div layout = "column" flex = 90 layout-margin>
|
|
||||||
<div>
|
|
||||||
Closest Task-
|
|
||||||
<md-card layout-margin layout-padding>
|
|
||||||
<div>
|
|
||||||
In Course: {{tasks[0].courseName}}
|
|
||||||
</div>
|
|
||||||
</md-card>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Latest Message-
|
|
||||||
<md-card layout-margin layout-padding>
|
|
||||||
{{userMessages[0].message}}
|
|
||||||
</md-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<table style="width:100%;" border = "1">
|
|
||||||
<tr>
|
|
||||||
<th>Message</th>
|
|
||||||
<th style = "width:20%;">Date</th>
|
|
||||||
<th style = "width:10%;">Committer</th>
|
|
||||||
</tr>
|
|
||||||
<tr ng-repeat = "commit in project.info.commits" layout-margin align = "center">
|
|
||||||
<td>
|
|
||||||
<span ng-repeat = "msg in commit">
|
|
||||||
<a target = "_blank"ng-href="{{commit.html_url}}"
|
|
||||||
style="text-decoration:none; color:black;">
|
|
||||||
{{msg.message}}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span ng-repeat = "date in commit.author">
|
|
||||||
{{date.date}}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td ng-repeat = "member in project.members">
|
|
||||||
<a ng-href="#/profile/{{member.id}}" style="text-decoration:none; color:black;">
|
|
||||||
{{member.name}}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<div ng-if="user.isLecturer"> <!-- Lecturer Mode -->
|
<div ng-if="user.isLecturer"> <!-- Lecturer Mode -->
|
||||||
<md-card>
|
<md-card>
|
||||||
<div flex = 90>
|
<div flex = "90">
|
||||||
<md-content>
|
<md-content>
|
||||||
<md-tabs md-dynamic-height md-border-bottom>
|
<md-tabs md-dynamic-height md-border-bottom>
|
||||||
<md-tab label="Messages">
|
<md-tab label="Messages">
|
||||||
<md-content class="tabDesign">
|
<md-content class="tabDesign">
|
||||||
<md-content class="messagesContent">
|
<!-- <md-content class="messagesContent"> -->
|
||||||
<md-card ng-repeat = "msg in userMessages">
|
<md-card ng-repeat = "msg in userMessages">
|
||||||
<div layout = "column" layout-padding>
|
<div layout = "column" layout-padding>
|
||||||
<div flex = 30 class="md-avatar">
|
<!-- <div> -->
|
||||||
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
<div flex = "30" class="md-avatar">
|
||||||
</div>
|
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
||||||
<div flex = 20 layout = "row">
|
|
||||||
<div>
|
|
||||||
{{msg.user.username}}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<!-- </div> -->
|
||||||
{{msg.group.courseName}}
|
<!-- <div> -->
|
||||||
<br></br>
|
<div flex = "20" layout = "row">
|
||||||
{{msg.group.projectName}}
|
<div>
|
||||||
|
{{msg.user.username}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{msg.group.courseName}}
|
||||||
|
{{msg.group.projectName}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
<div flex = 40>
|
<!-- <div> -->
|
||||||
{{msg.message}}
|
<div flex = "40">
|
||||||
</div>
|
{{msg.message}}
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
|
|
||||||
<!-- <div flex layout="column">
|
|
||||||
<div flex = 30 class="md-avatar" layout-padding layout-margin>
|
|
||||||
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div layout = "row" flex = 15 layout-padding>
|
|
||||||
<div>
|
|
||||||
{{msg.user.username}}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{msg.group.courseName}}
|
|
||||||
{{msg.group.projectName}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div flex = 50 layout-padding>
|
|
||||||
{{msg.message}}
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
</md-card>
|
</md-card>
|
||||||
</md-content>
|
|
||||||
<!-- </div> -->
|
|
||||||
</md-content>
|
</md-content>
|
||||||
|
<!-- </md-content> -->
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="Tasks">
|
<md-tab label="Tasks waiting for review">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">Tasks</h1>
|
<md-card ng-repeat = "task in userTasks" layout-padding>
|
||||||
<div>
|
<div>
|
||||||
|
Title:
|
||||||
</div>
|
<md-button ng-click="gotoTask(task)">
|
||||||
|
{{task.title}}
|
||||||
|
</md-button>
|
||||||
|
<br></br>
|
||||||
|
Description: {{task.description}}
|
||||||
|
</div>
|
||||||
|
</md-card>
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="two">
|
<!-- <md-tab label="two">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">Tab Two</h1>
|
<h1 class="md-display-2">Tab Two</h1>
|
||||||
Two
|
Two
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab> -->
|
||||||
</md-tabs>
|
</md-tabs>
|
||||||
</md-content>
|
</md-content>
|
||||||
</div>
|
</div>
|
||||||
|
@ -171,75 +112,104 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </md-content> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="isStudent"> <!-- Student Mode -->
|
<div ng-if="isStudent"> <!-- Student Mode -->
|
||||||
<md-content>
|
<div layout = "column" flex = 90 layout-margin>
|
||||||
<div layout="row">
|
<div>
|
||||||
<div flex="65">
|
Closest Task-
|
||||||
<md-card>
|
<md-card layout-margin layout-padding>
|
||||||
<p class = "messagesFeed">Messages</p>
|
<div>
|
||||||
</md-card>
|
<md-button ng-click="gotoTask(userTasks[0])">
|
||||||
</div>
|
{{userTasks[0].title}}
|
||||||
<div flex="34">
|
</md-button>
|
||||||
<md-card>
|
</div>
|
||||||
<p class = "tasksFeed">Tasks</p>
|
</md-card>
|
||||||
</md-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div layout="row">
|
<div>
|
||||||
<div flex="65">
|
Latest Message-
|
||||||
<md-card>
|
<md-card layout-margin layout-padding>
|
||||||
<div class = "messagesContent">
|
{{userMessages[0].message}}
|
||||||
<md-card ng-repeat = "msg in messages">
|
</md-card>
|
||||||
<div layout="column">
|
</div>
|
||||||
<div layout="row" layout-margin layout-padding>
|
</div>
|
||||||
<div flex="10">
|
<md-content>
|
||||||
<img ng-src="{{user.avatar_url}}" class="roundUserAvatar" style = "width:70%;">
|
<md-card>
|
||||||
</div>
|
<div flex="100">
|
||||||
<div flex>
|
<md-tabs md-dynamic-height md-border-bottom>
|
||||||
<div layout = "column">
|
<md-tab label="Messages">
|
||||||
<div>
|
<md-content class="tabDesign">
|
||||||
<b>{{user.name}}</b>
|
<md-content class="messagesContent">
|
||||||
|
<md-card ng-repeat = "msg in userMessages">
|
||||||
|
<div layout = "column" layout-padding>
|
||||||
|
<div flex = "30" class="md-avatar">
|
||||||
|
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div flex = "20" layout = "row">
|
||||||
class_name
|
<div>
|
||||||
|
{{msg.user.username}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{msg.group.courseName}}
|
||||||
|
{{msg.group.projectName}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div flex = "40">
|
||||||
|
{{msg.message}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</md-card>
|
||||||
|
</md-content>
|
||||||
|
<!-- </div> -->
|
||||||
|
</md-content>
|
||||||
|
</md-tab>
|
||||||
|
<md-tab label="Tasks">
|
||||||
|
<md-content class="md-padding">
|
||||||
|
<md-card ng-repeat = "task in userTasks" layout-padding>
|
||||||
|
<div>
|
||||||
|
Title:
|
||||||
|
<md-button ng-click="gotoTask(task)">
|
||||||
|
{{task.title}}
|
||||||
|
</md-button>
|
||||||
|
<br></br>
|
||||||
|
Description: {{task.description}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</md-card>
|
||||||
<div>
|
</md-content>
|
||||||
<div flex="69" class="msgSent" layout-margin layout-padding>
|
</md-tab>
|
||||||
{{msg.text}}
|
<!-- <md-tab label="two">
|
||||||
</div>
|
<md-content class="md-padding">
|
||||||
</div>
|
<h1 class="md-display-2">Tab Two</h1>
|
||||||
</div>
|
Two
|
||||||
</md-card>
|
</md-content>
|
||||||
</div>
|
</md-tab> -->
|
||||||
</md-card>
|
</md-tabs>
|
||||||
</div>
|
</div>
|
||||||
<div flex="34">
|
</md-card>
|
||||||
<md-card>
|
<div class ="addMessage" layout="row" layout-margin layout padding>
|
||||||
<p class = "tasksContent">
|
<div>
|
||||||
For Task 3 Press: <a href="http://localhost:8080/home#/tasks">Task #3</a>
|
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary"><i class="fa fa-comments"></i></md-button>
|
||||||
<br></br>
|
</div>
|
||||||
For Task 4 Press: <a href="http://localhost:8080/home#/home">Task #4</a>
|
</div>
|
||||||
<br></br>
|
<div ng-if="addMsg">
|
||||||
For Task 5 Press: <a href="http://localhost:8080/home#/home">Task #5</a>
|
<div layout = "row" layout-margin layout padding layout-align = "left center">
|
||||||
<br></br>
|
<md-button ng-click="postMessageClicked()" ng class="md-raised md-primary">Post</md-button>
|
||||||
For Task 6 Press: <a href="http://localhost:8080/home#/home">Task #6</a>
|
<md-button ng-click="clearAllClicked()" ng class="md-raised md-primary">Clear All</md-button>
|
||||||
<br></br>
|
</div>
|
||||||
For Task 7 Press: <a href="http://localhost:8080/home#/home">Task #7</a>
|
<div class="port_spacer"></div>
|
||||||
<br></br>
|
<div layout-padding layout = "row">
|
||||||
For Task 8 Press: <a href="http://localhost:8080/home#/home">Task #8</a>
|
<div flex = "60">
|
||||||
</p>
|
<md-input-container>
|
||||||
</md-card>
|
<label> Write Your Desired Message Here And Press Post</label>
|
||||||
|
<input type="text" minlength="1" ng-model="msg.msgToAdd" required></input>
|
||||||
|
</md-input-container>
|
||||||
|
</div>
|
||||||
|
<div flex = "30">
|
||||||
|
<md-select placeholder="Choose Course" ng-model="courseObj.name" ng-change="chooseCourseClicked()" style="z-index: 300" class="courseDropDown" required>
|
||||||
|
<md-option ng-repeat="c in courses" value="{{c.courseName}}">{{c.courseName}}</md-option>
|
||||||
|
</md-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <md-button ng-click="chooseCourseClicked()" ng class="md-raised md-primary">Choose Course</md-button> -->
|
</div>
|
||||||
<!-- <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>
|
</md-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,7 @@
|
||||||
<div layout='row'>
|
<div ng-if='loading' class='center_all'>
|
||||||
|
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
||||||
|
</div>
|
||||||
|
<div layout='row' ng-if='!loading'>
|
||||||
<div flex='20'></div>
|
<div flex='20'></div>
|
||||||
<div layout="coulumn" flex="60">
|
<div layout="coulumn" flex="60">
|
||||||
<md-card layout-padding style="width:100%">
|
<md-card layout-padding style="width:100%">
|
||||||
|
|
|
@ -24,8 +24,13 @@
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="Not Submitted">
|
<md-tab label="Not Submitted">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">Not Submitted</h1>
|
<md-card ng-repeat = "task in lecturerTasks">
|
||||||
<p> Not Submitted ..</p>
|
<md-button ng-click="gotoTask(task.id)">
|
||||||
|
{{task.title}}
|
||||||
|
</md-button>
|
||||||
|
|
||||||
|
</md-card>
|
||||||
|
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<div ng-if = "user.isLecturer">
|
<div ng-if = "user.isLecturer">
|
||||||
|
|