From bb3f56bb4408c9275a28e5a9e6efc9485af8ac8f Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Tue, 30 Jun 2015 19:47:22 +0300 Subject: [PATCH] - graphs in project - updated over period of time (graphs are big again) --- templates/js/controllers/projectController.js | 29 ++++---- templates/views/project.html | 73 ++++++++----------- 2 files changed, 45 insertions(+), 57 deletions(-) diff --git a/templates/js/controllers/projectController.js b/templates/js/controllers/projectController.js index de2efb7..70311cf 100644 --- a/templates/js/controllers/projectController.js +++ b/templates/js/controllers/projectController.js @@ -15,12 +15,10 @@ angular.module('SeHub') $scope.editProject = function(ev) { $scope.isEditPressed = true; - console.log("EditPressed " + $scope.isEditPressed); } $scope.removeProject = function(ev) { - console.log("Project has been removed!"); $mdDialog.show($mdDialog.alert().title('Remove Project').content('Are you sure you want to remove the project ?') .ariaLabel('Removing project alert dialog').ok('Yes').targetEvent(ev)); // .then(function() { @@ -28,15 +26,27 @@ angular.module('SeHub') // }); // Pop-up alert }; - + $scope.getProfileRoute = function(assigneeName) + { + for(var i = 0; i < $scope.project.members.length; i++) + { + + if(assigneeName === $scope.project.members[i].name) + { + console.log(assigneeName); + console.log($scope.project.members[i].name); + return '#/profile/' + $scope.project.members[i].id; + } + else + return '#'; + } + } $scope.getProjectInfo = function() { apiService.getProjectsById(token, projectId).success(function(data) { $scope.project = data; - console.log($scope.project); - $scope.init_line_lables(); // if($scope.user === $scope.project.info.master_id) // { // $scope.isMasterOrLecturer = true; @@ -45,20 +55,11 @@ angular.module('SeHub') // { $scope.loadingData = false; // } - - console.log($scope.project); }).error(function(err) { console.log("Error: " + err.message); }); } - $scope.init_line_lables = function(){ - $scope.project.weekly_labels = []; - for(var i = 0 ; i < $scope.project.info.stats.weekly_commits[0].length; i++) - $scope.project.weekly_labels.push('w '+i.toString()); - - } - $scope.getProjectInfo(); // Get all this project data }]); \ No newline at end of file diff --git a/templates/views/project.html b/templates/views/project.html index 48f1384..91ecb2a 100644 --- a/templates/views/project.html +++ b/templates/views/project.html @@ -1,45 +1,35 @@
-

Project '{{project.projectName}}'

-
+
-
-
-
- - -
- - - -
-
- - - -
-
- +
+
+ + +
+ + + +
+
+ + + +
+
+ +
-
- - -
+
Team Members:
    @@ -48,16 +38,16 @@
-
+
- +
-
+
@@ -82,8 +72,8 @@ - - + +
NameNumberurlTitleUrl
@@ -128,21 +118,18 @@ {{issue.milestone.title}} - - {{issue.user.login}} - + + + {{issue.assignee.login}} + + +
- - -

Bugs

-

Bugs ..

-
-

tasks