- Main menu nav - Project reference fixed
This commit is contained in:
parent
c64b865f3d
commit
b630f0d696
2 changed files with 29 additions and 34 deletions
|
@ -31,7 +31,7 @@ angular.module('SeHub')
|
|||
"title": "Projects",
|
||||
"icon": "fa fa-cube",
|
||||
"style": "",
|
||||
"route": "/projects"
|
||||
"route": "/projects/" + $scope.user.id.toString()
|
||||
}, {
|
||||
"title": "Tasks",
|
||||
"icon": "fa fa-clipboard",
|
||||
|
|
|
@ -5,8 +5,6 @@ angular.module('SeHub')
|
|||
var classId = $routeParams.id;
|
||||
$scope.projectEmpty = false;
|
||||
|
||||
|
||||
|
||||
$scope.displayProjects = function()
|
||||
{
|
||||
console.log("in displayProjecs!!! ");
|
||||
|
@ -19,6 +17,10 @@ angular.module('SeHub')
|
|||
{
|
||||
console.log("Error: " + err);
|
||||
});
|
||||
if($scope.projects = null)
|
||||
{
|
||||
$scope.projectEmpty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,41 +46,34 @@ angular.module('SeHub')
|
|||
var i, j, counter = 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
newLength = (Math.ceil($scope.projects.length / 3)); // Rounds number up
|
||||
}
|
||||
|
||||
console.log("length: " + newLength);
|
||||
$scope.arrayHolder.length = newLength;
|
||||
|
||||
for(j = 0; j < newLength; j++)
|
||||
{
|
||||
$scope.arrayHolder[j] = [3]; // Creating array in size of 3 in each array cell
|
||||
}
|
||||
|
||||
for(i = 0; i < newLength; i++)
|
||||
{
|
||||
for(j = 0; j < newLength; j++)
|
||||
{
|
||||
if($scope.projects[(3*i) + j] != null)
|
||||
{
|
||||
$scope.arrayHolder[i][j] = $scope.projects[(3*i) + j];
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log($scope.arrayHolder);
|
||||
newLength = ($scope.projects.length / 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.projectEmpty = true;
|
||||
newLength = (Math.ceil($scope.projects.length / 3)); // Rounds number up
|
||||
}
|
||||
|
||||
console.log("length: " + newLength);
|
||||
$scope.arrayHolder.length = newLength;
|
||||
|
||||
for(j = 0; j < newLength; j++)
|
||||
{
|
||||
$scope.arrayHolder[j] = [3]; // Creating array in size of 3 in each array cell
|
||||
}
|
||||
|
||||
for(i = 0; i < newLength; i++)
|
||||
{
|
||||
for(j = 0; j < newLength; j++)
|
||||
{
|
||||
if($scope.projects[(3*i) + j] != null)
|
||||
{
|
||||
$scope.arrayHolder[i][j] = $scope.projects[(3*i) + j];
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log($scope.arrayHolder);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue