mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
confirmation when leaving party or guilds, fix #866
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user