tasks-fix-delete-message

This commit is contained in:
Keith Holliday
2015-11-29 14:30:22 -06:00
parent 5e105a0e45
commit ea87784575
3 changed files with 4 additions and 4 deletions

View File

@@ -86,7 +86,7 @@
"fortifyPop": "Return all tasks to neutral value (yellow color), and restore all lost Health.",
"fortify": "Fortify",
"fortifyText": "Fortify will return all your tasks to a neutral (yellow) state, as if you'd just added them, and top your Health off to full. This is great if all your red tasks are making the game too hard, or all your blue tasks are making the game too easy. If starting fresh sounds much more motivating, spend the Gems and catch a reprieve!",
"sureDelete": "Are you sure you want to delete this task?",
"sureDelete": "Are you sure you want to delete the <%= taskType %> with the text \"<%= taskText %>\"?",
"streakCoins": "Streak Bonus!",
"pushTaskToTop": "Push task to top",
"pushTaskToBottom": "Push task to bottom",

View File

@@ -212,7 +212,7 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
};
$scope.removeTask = function(task, list) {
if (!confirm(window.env.t('sureDelete'))) return;
if (!confirm(window.env.t('sureDelete', {taskType: task.type, taskText: task.text}))) return;
//TODO persist
// User.log({op: "delTask", data: task});
_.remove(list, task);

View File

@@ -92,7 +92,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
};
$scope.removeTask = function(task) {
if (!confirm(window.env.t('sureDelete'))) return;
if (!confirm(window.env.t('sureDelete', {taskType: task.type, taskText: task.text}))) return;
User.user.ops.deleteTask({params:{id:task.id}})
};