diff --git a/templates/js/controllers/classController.js b/templates/js/controllers/classController.js
index ce54da4..e7e13ae 100644
--- a/templates/js/controllers/classController.js
+++ b/templates/js/controllers/classController.js
@@ -29,7 +29,6 @@ angular.module('SeHub')
{
console.log("Error: " + err);
});
-
}
$scope.joinCourse = function()
{
diff --git a/templates/js/controllers/myProjectsController.js b/templates/js/controllers/myProjectsController.js
index f6cc3e0..c55bf1d 100644
--- a/templates/js/controllers/myProjectsController.js
+++ b/templates/js/controllers/myProjectsController.js
@@ -2,7 +2,7 @@ angular.module('SeHub')
.controller('myProjectsController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
$scope.isEditPressed = false;
- $scope.loadingDate = true;
+ $scope.loadingData = true;
$scope.myProjectsEmpty = true;
$scope.user = $scope.$parent.user;
var token = $cookies['com.sehub.www'];
@@ -12,12 +12,15 @@ angular.module('SeHub')
{
apiService.getProjectsByUser(token).success(function(data)
{
- $scope.loadingDate = false;
+ $scope.loadingData = false;
$scope.myProjects = data;
if($scope.myProjects != null && $scope.myProjects.length > 0)
{
$scope.myProjectsEmpty = false;
}
+ init(); // Executing the function to initialize my projects display
+ console.log(data);
+ console.log("Success");
}).error(function(err)
{
console.log("Error: " + err.message);
@@ -42,16 +45,16 @@ angular.module('SeHub')
$scope.arrayHolder = [];
var tempArr = [];
var sizeOfSmallArrays = 3;
- for (var i = 0 ; i < $scope.projects.length ; i++) {
+ for (var i = 0 ; i < $scope.myProjects.length ; i++) {
if(i % sizeOfSmallArrays !== 0){
- tempArr.push($scope.projects[i]);
+ tempArr.push($scope.myProjects[i]);
}else{
if(i !== 0){
$scope.arrayHolder.push(tempArr);
tempArr = [];
- tempArr.push($scope.projects[i]);
+ tempArr.push($scope.myProjects[i]);
}else{
- tempArr.push($scope.projects[i]);
+ tempArr.push($scope.myProjects[i]);
}
}
};
diff --git a/templates/views/class.html b/templates/views/class.html
index 4a12650..c61c87f 100644
--- a/templates/views/class.html
+++ b/templates/views/class.html
@@ -10,11 +10,22 @@