mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
small design tweaks, fix #1682
This commit is contained in:
@@ -67,6 +67,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
||||
challenge.$save(function(_challenge){
|
||||
if (isNew) {
|
||||
Notification.text('Challenge Created');
|
||||
$state.go('options.social.challenges.detail', {cid: _challenge._id});
|
||||
$scope.discard();
|
||||
$scope.challenges = Challenges.Challenge.query();
|
||||
User.sync();
|
||||
@@ -129,6 +130,14 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
||||
|
||||
}
|
||||
|
||||
$scope.toggle = function(id){
|
||||
if($state.includes('options.social.challenges.detail', {cid: id})){
|
||||
$state.go('options.social.challenges')
|
||||
}else{
|
||||
$state.go('options.social.challenges.detail', {cid: id});
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// Tasks
|
||||
//------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user