Revert "fixes task edit cancellation commit (#7931)"

This reverts commit bbf15e1756.
This commit is contained in:
Sabe Jones
2016-09-13 16:32:52 +00:00
parent 282822def6
commit 2da9876e42
12 changed files with 77 additions and 100 deletions

View File

@@ -35,7 +35,6 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
}
$scope.editTask = Tasks.editTask;
$scope.cancelTaskEdit = Tasks.cancelTaskEdit;
$scope.canEdit = function(task) {
return true;
@@ -305,10 +304,8 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
};
$scope.saveTask = function(task){
angular.copy(task._edit, task);
task._edit = undefined;
task._editing = false;
Tasks.updateTask(task._id, task);
task._editing = false;
}
$scope.toggleBulk = Tasks.toggleBulk;