small design tweaks, fix #1682

This commit is contained in:
Matteo Pagliazzi
2013-11-01 18:33:50 +01:00
parent cc5126f09b
commit 3562079ba6
3 changed files with 19 additions and 3 deletions

View File

@@ -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
//------------------------------------------------------------