Refactored editTask into TaskService

This commit is contained in:
Blade Barringer
2015-06-16 23:11:04 -05:00
parent 18fe4b6166
commit 3ab27f32d2
10 changed files with 176 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'ApiUrl', '$timeout', 'Shared', 'Guide',
function($scope, $rootScope, $location, User, Notification, $http, ApiUrl, $timeout, Shared, Guide) {
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'ApiUrl', '$timeout', 'Shared', 'Guide', 'Tasks',
function($scope, $rootScope, $location, User, Notification, $http, ApiUrl, $timeout, Shared, Guide, Tasks) {
$scope.obj = User.user; // used for task-lists
$scope.user = User.user;
@@ -65,6 +65,10 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
list.focus = true;
};
$scope.editTask = function(task) {
Tasks.editTask(task);
};
/**
* Add the new task to the actions log
*/