mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
challenges: better syncing of new, updated, & deleted tasks from
challenge to user. start with task.challenge.broken code
This commit is contained in:
@@ -43,7 +43,9 @@ habitrpg.controller("ChallengesCtrl", ['$scope', '$rootScope', 'User', 'Challeng
|
||||
$scope.discard();
|
||||
Challenges.Challenge.query();
|
||||
} else {
|
||||
challenge._editing = false;
|
||||
// TODO figure out a more elegant way about this
|
||||
//challenge._editing = false;
|
||||
$scope.locked = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -61,7 +63,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', '$rootScope', 'User', 'Challeng
|
||||
*/
|
||||
$scope["delete"] = function(challenge) {
|
||||
if (confirm("Delete challenge, are you sure?") !== true) return;
|
||||
challenge.delete();
|
||||
challenge.$delete();
|
||||
};
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user