mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix chart shown below task edit form
This commit is contained in:
@@ -77,7 +77,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||||||
default:
|
default:
|
||||||
$rootScope.charts[id] = !$rootScope.charts[id];
|
$rootScope.charts[id] = !$rootScope.charts[id];
|
||||||
history = task.history;
|
history = task.history;
|
||||||
if (task) task._editing = false;
|
if (task && task._editing) task._editing = false;
|
||||||
}
|
}
|
||||||
matrix = [['Date', 'Score']];
|
matrix = [['Date', 'Score']];
|
||||||
_.each(history, function(obj) {
|
_.each(history, function(obj) {
|
||||||
|
|||||||
@@ -70,6 +70,13 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User', '
|
|||||||
op: "revive"
|
op: "revive"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.toggleEdit = function(task){
|
||||||
|
console.log(task)
|
||||||
|
task._editing = !task._editing;
|
||||||
|
if($rootScope.charts[task.id]) $rootScope.charts[task.id] = false;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.remove = function(task) {
|
$scope.remove = function(task) {
|
||||||
var tasks;
|
var tasks;
|
||||||
if (confirm("Are you sure you want to delete this task?") !== true) {
|
if (confirm("Are you sure you want to delete this task?") !== true) {
|
||||||
@@ -82,6 +89,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User', '
|
|||||||
});
|
});
|
||||||
tasks.splice(tasks.indexOf(task), 1);
|
tasks.splice(tasks.indexOf(task), 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
------------------------
|
------------------------
|
||||||
Items
|
Items
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ li(ng-repeat='task in user[list.type + "s"]', class='task {{taskClasses(task,use
|
|||||||
i.icon-tags(tooltip='{{appliedTags(user.tags, task.tags)}}', ng-hide='noTags(task.tags)')
|
i.icon-tags(tooltip='{{appliedTags(user.tags, task.tags)}}', ng-hide='noTags(task.tags)')
|
||||||
|
|
||||||
// edit
|
// edit
|
||||||
a(ng-hide='task._editing', ng-click='task._editing = !task._editing', tooltip='Edit')
|
a(ng-hide='task._editing', ng-click='toggleEdit(task)', tooltip='Edit')
|
||||||
i.icon-pencil(ng-hide='task._editing')
|
i.icon-pencil(ng-hide='task._editing')
|
||||||
// cancel
|
// cancel
|
||||||
a(ng-hide='!task._editing', ng-click='task._editing = !task._editing', tooltip='Cancel')
|
a(ng-hide='!task._editing', ng-click='toggleEdit(task)', tooltip='Cancel')
|
||||||
i.icon-remove(ng-hide='!task._editing')
|
i.icon-remove(ng-hide='!task._editing')
|
||||||
//- challenges
|
//- challenges
|
||||||
// {{#if task.challenge}}
|
// {{#if task.challenge}}
|
||||||
|
|||||||
Reference in New Issue
Block a user