mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Merge branch 'develop' into blade-feature/search
This commit is contained in:
@@ -4,6 +4,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
function($scope, $rootScope, $location, User, Notification, $http, ApiUrl, $timeout, Shared, Guide) {
|
||||
$scope.obj = User.user; // used for task-lists
|
||||
$scope.user = User.user;
|
||||
|
||||
$scope.armoireCount = function(gear) {
|
||||
return Shared.countArmoire(gear);
|
||||
};
|
||||
@@ -131,6 +132,19 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
*/
|
||||
$scope._today = moment().add({days: 1});
|
||||
|
||||
/*
|
||||
------------------------
|
||||
Dailies
|
||||
------------------------
|
||||
*/
|
||||
|
||||
$scope.openDatePicker = function($event, task) {
|
||||
$event.preventDefault();
|
||||
$event.stopPropagation();
|
||||
|
||||
task._isDatePickerOpen = !task._isDatePickerOpen;
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------
|
||||
Checklists
|
||||
@@ -216,7 +230,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
$scope.shouldShow = function(task, list, prefs){
|
||||
if (task._editing) // never hide a task while being edited
|
||||
return true;
|
||||
var shouldDo = task.type == 'daily' ? habitrpgShared.shouldDo(new Date, task.repeat, prefs) : true;
|
||||
var shouldDo = task.type == 'daily' ? habitrpgShared.shouldDo(new Date, task, prefs) : true;
|
||||
switch (list.view) {
|
||||
case "yellowred": // Habits
|
||||
return task.value < 1;
|
||||
|
||||
Reference in New Issue
Block a user