Working with updated _edit model

This commit is contained in:
Husman
2016-06-21 20:39:26 -07:00
parent cfacf039df
commit 1a6f08545b
14 changed files with 170 additions and 137 deletions

View File

@@ -35,6 +35,7 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
}
$scope.editTask = Tasks.editTask;
$scope.cancelTaskEdit = Tasks.cancelTaskEdit;
/**
* Create
@@ -274,6 +275,8 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
};
$scope.saveTask = function(task){
angular.copy(task._edit, task);
task._edit = undefined;
task._editing = false;
// TODO persist
}