- Main menu nav - Project reference fixed

This commit is contained in:
Matan Bar Yosef 2015-06-27 12:58:04 +03:00
parent c64b865f3d
commit b630f0d696
2 changed files with 29 additions and 34 deletions

View file

@ -31,7 +31,7 @@ angular.module('SeHub')
"title": "Projects", "title": "Projects",
"icon": "fa fa-cube", "icon": "fa fa-cube",
"style": "", "style": "",
"route": "/projects" "route": "/projects/" + $scope.user.id.toString()
}, { }, {
"title": "Tasks", "title": "Tasks",
"icon": "fa fa-clipboard", "icon": "fa fa-clipboard",

View file

@ -5,8 +5,6 @@ angular.module('SeHub')
var classId = $routeParams.id; var classId = $routeParams.id;
$scope.projectEmpty = false; $scope.projectEmpty = false;
$scope.displayProjects = function() $scope.displayProjects = function()
{ {
console.log("in displayProjecs!!! "); console.log("in displayProjecs!!! ");
@ -19,6 +17,10 @@ angular.module('SeHub')
{ {
console.log("Error: " + err); console.log("Error: " + err);
}); });
if($scope.projects = null)
{
$scope.projectEmpty = true;
}
} }
@ -44,8 +46,6 @@ angular.module('SeHub')
var i, j, counter = 0; var i, j, counter = 0;
var newLength = 0; var newLength = 0;
if($scope.projects != null)
{
if(($scope.projects.length % 3) === 0) if(($scope.projects.length % 3) === 0)
{ {
newLength = ($scope.projects.length / 3); newLength = ($scope.projects.length / 3);
@ -75,11 +75,6 @@ angular.module('SeHub')
} }
console.log($scope.arrayHolder); console.log($scope.arrayHolder);
} }
else
{
$scope.projectEmpty = true;
}
}