mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 08:22:17 +00:00
confirmation when leaving party or guilds, fix #866
This commit is contained in:
parent
86b3ca5d6b
commit
2c32095924
1 changed files with 6 additions and 0 deletions
|
|
@ -143,6 +143,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
|
|||
}
|
||||
|
||||
$scope.leave = function(group){
|
||||
if (confirm("Are you sure you want to delete this guild?") !== true) {
|
||||
return;
|
||||
}
|
||||
group.$leave();
|
||||
// var i = _.find($scope.groups.guilds, {_id:group._id});
|
||||
// if (~i) $scope.groups.guilds.splice(i, 1);
|
||||
|
|
@ -179,6 +182,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
|
|||
});
|
||||
}
|
||||
$scope.leave = function(group){
|
||||
if (confirm("Are you sure you want to leave this party?") !== true) {
|
||||
return;
|
||||
}
|
||||
group.$leave(function(){
|
||||
Groups.groups.party = new Groups.Group();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue