mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
tasks-fix-delete-message
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
"fortifyPop": "Return all tasks to neutral value (yellow color), and restore all lost Health.",
|
"fortifyPop": "Return all tasks to neutral value (yellow color), and restore all lost Health.",
|
||||||
"fortify": "Fortify",
|
"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!",
|
"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!",
|
"streakCoins": "Streak Bonus!",
|
||||||
"pushTaskToTop": "Push task to top",
|
"pushTaskToTop": "Push task to top",
|
||||||
"pushTaskToBottom": "Push task to bottom",
|
"pushTaskToBottom": "Push task to bottom",
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.removeTask = function(task, list) {
|
$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
|
//TODO persist
|
||||||
// User.log({op: "delTask", data: task});
|
// User.log({op: "delTask", data: task});
|
||||||
_.remove(list, task);
|
_.remove(list, task);
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.removeTask = function(task) {
|
$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}})
|
User.user.ops.deleteTask({params:{id:task.id}})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user