From 9bede4b39960a3c9af53c087d8193a45bca32ab5 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Sat, 1 Aug 2015 18:18:21 +0300 Subject: [PATCH] -loadingData - in progress --- templates/js/controllers/classController.js | 6 ++---- templates/js/controllers/projectController.js | 3 ++- templates/views/class.html | 4 ++-- templates/views/project.html | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/js/controllers/classController.js b/templates/js/controllers/classController.js index 00c985f..2690cdc 100644 --- a/templates/js/controllers/classController.js +++ b/templates/js/controllers/classController.js @@ -8,6 +8,7 @@ angular.module('SeHub') $scope.isCreateProjectClicked = false; $scope.submitNewCourseClicked = false; $scope.loadingData = true; + $scope.creatingProject = false; $scope.isInCourse = false; var startDate = null; var endDate = null; @@ -71,7 +72,6 @@ angular.module('SeHub') } $scope.createProjectClicked = function() { - // console.log("project created! is it ?!???! " + classId); $scope.isCreateProjectClicked = !$scope.isCreateProjectClicked; if($scope.isCreateProjectClicked) $scope.createSctionStatus = "fa fa-angle-up"; @@ -80,10 +80,8 @@ angular.module('SeHub') } $scope.submitNewProject = function() { - loadingData = true; - // debugger; + $scope.creatingProject = true; var intClassId = parseInt(classId); - // console.log($scope); var jsonNewProj = { 'projectName': $scope.project.projectName, 'courseId': intClassId, diff --git a/templates/js/controllers/projectController.js b/templates/js/controllers/projectController.js index f51f37b..7fe243c 100644 --- a/templates/js/controllers/projectController.js +++ b/templates/js/controllers/projectController.js @@ -23,7 +23,8 @@ angular.module('SeHub') .ariaLabel('Join project alert dialog').ok('Aight').targetEvent(ev)); }).error(function(err) { - console.log("Error: " + err.message); + $mdDialog.show($mdDialog.alert().title('Join Project').content(err.message) + .ariaLabel('Join project alert dialog').ok('Try Again').targetEvent(ev)); }); } diff --git a/templates/views/class.html b/templates/views/class.html index ef3fe11..7baffb0 100644 --- a/templates/views/class.html +++ b/templates/views/class.html @@ -71,8 +71,8 @@
- Submit Project -
+ Submit Project +
diff --git a/templates/views/project.html b/templates/views/project.html index dbf7ee4..01a9f8c 100644 --- a/templates/views/project.html +++ b/templates/views/project.html @@ -18,7 +18,7 @@
-
+