-loadingData - in progress
This commit is contained in:
parent
7e3eeb104c
commit
9bede4b399
4 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
</md-input-container>
|
||||
</div>
|
||||
<div layout-padding layout-margin>
|
||||
<md-button ng-click="submitNewProject()" ng class="md-raised md-primary">Submit Project</md-button>
|
||||
<div layout-paddig layout-margin class="loader" ng-if="loadingData">
|
||||
<md-button ng-disabled="creatingProject" ng-click="submitNewProject()" class="md-raised md-primary">Submit Project</md-button>
|
||||
<div layout-padding layout-margin class="loader" ng-if="creatingProject">
|
||||
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div layout = "row" flex = "45">
|
||||
<!-- <div ng-if = "isMasterOrLecturer"> -->
|
||||
<md-card layout = "row">
|
||||
<div ng-if="isMember" layout-padding>
|
||||
<div ng-if="!isMember" layout-padding>
|
||||
<md-button ng-click="joinProject()" ng class = "md-raised md-primary">
|
||||
<i class="fa fa-user-plus"></i>
|
||||
</md-button>
|
||||
|
|
Loading…
Reference in a new issue