mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Reimplement (broken) task ordering
This commit is contained in:
@@ -58,7 +58,7 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
var groupsWithChallenges = _.uniq(_.pluck($scope.groupsFilter, '_id'));
|
||||
var len = groupsWithChallenges.length;
|
||||
var filterCount = 0;
|
||||
|
||||
|
||||
for ( var i = 0; i < len; i += 1 ) {
|
||||
if ( $scope.search.group[groupsWithChallenges[i]] == true ) {
|
||||
filterCount += 1;
|
||||
@@ -186,11 +186,11 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
delete listDef.newTask;
|
||||
};
|
||||
|
||||
$scope.removeTask = function(list, $index) {
|
||||
$scope.removeTask = function(task, list) {
|
||||
if (!confirm(window.env.t('sureDelete'))) return;
|
||||
//TODO persist
|
||||
// User.log({op: "delTask", data: task});
|
||||
list.splice($index, 1);
|
||||
_.remove(list, task);
|
||||
};
|
||||
|
||||
$scope.saveTask = function(task){
|
||||
|
||||
Reference in New Issue
Block a user