Merge branch 'develop' into blade-Finish_weeklies_pr

Added Sabe's novalidate change to adding a new task
This commit is contained in:
Blade Barringer
2015-06-10 07:53:37 -05:00
195 changed files with 2487 additions and 1401 deletions

View File

@@ -94,15 +94,14 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
challenge.$save(function(_challenge){
if (isNew) {
Notification.text(window.env.t('challengeCreated'));
$state.go('options.social.challenges.detail', {cid: _challenge._id});
$scope.discard();
$scope.challenges = Challenges.Challenge.query();
$state.transitionTo('options.social.challenges.detail', {cid: challenge._id}, {
reload: true, inherit: false, notify: true
});
User.sync();
} else {
// TODO figure out a more elegant way about this
//challenge._editing = false;
challenge._locked = true;
getChallenges();
$state.transitionTo('options.social.challenges.detail', {cid: challenge._id}, {
reload: true, inherit: false, notify: true
});
}
});
};