Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fetch group after delete
Browse files Browse the repository at this point in the history
  • Loading branch information
smartlt committed Dec 7, 2015
1 parent 8e31744 commit 2f3a610
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ui/static/app/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,14 @@ app.controller('GroupManageController', function($scope, $http, $location, $stat
$scope.groupMember_pending = data.data;
});
}
function fetchSubgroup(){
$http.get('/api/group/'+ $stateParams.id + '/subgroup').success(function(data){
$scope.subgroups = data;
});
}

fetchMember();
fetchSubgroup();

function acceptMember(pk){
$http.put('/api/group/'+groupID+'/member/'+ pk).then(function(data){
Expand All @@ -180,6 +186,7 @@ app.controller('GroupManageController', function($scope, $http, $location, $stat
group_id : id
};
$http.put('/api/group/'+ $stateParams.id + '/subgroup',data).success(function(data){
fetchSubgroup();
});

};
Expand All @@ -188,9 +195,8 @@ app.controller('GroupManageController', function($scope, $http, $location, $stat
$scope.group = data.data;
});

$http.get('/api/group/'+ $stateParams.id + '/subgroup').success(function(data){
$scope.subgroups = data;
});



$scope.editInfo = function(){
$http.put('/api/group/'+groupID+'/edit/',$scope.group).success(function(data){
Expand Down

0 comments on commit 2f3a610

Please sign in to comment.