fix #2058 double-task deletion

This commit is contained in:
Tyler Renelle 2013-12-19 19:39:12 -07:00
parent 6e3bb61f6e
commit f4fca98bd1
2 changed files with 1 additions and 4 deletions

View file

@ -36,13 +36,10 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
$scope.score(task, "down");
}
};
/* TODO this should be somewhere else, but fits the html location better here
*/
$scope.removeTask = function(list, $index) {
if (!confirm("Are you sure you want to delete this task?")) return;
User.user.ops.deleteTask({params:{id:list[$index].id}})
list.splice($index, 1);
};
$scope.saveTask = function(task) {

View file

@ -1,6 +1,6 @@
form.chat-form(ng-submit='postChat(group,message.content)')
.-options
//FIXME ng-model makes this painfully slow! using jquery for now, which is really non-angular-like
//FIXME ng-model makes this painfully slow! using jquery for now, which is really non-angular-like
.control-group.option-large(ng-controller='AutocompleteCtrl')
textarea.chat-textarea.option-content(style='height:6em;', ui-keypress='{13:"postChat(group,message.content)"}', ng-model='message.content', updateinterval='250', flag='@', at-user, auto-complete)
span.user-list(ng-show='!isAtListHidden')