mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Added support for grouping tasks by challenge (#8469)
* Added support for grouping tasks by chllenge * Fixed tests and updated default challenge model name * Fixed broken member test * Updated setting string * Changed to shortName * Began abstracting task grouping * Added initial task directive code * Added new directives to help with grouping of tasks * Removed random console.log
This commit is contained in:
24
website/client-old/js/directives/task.directive.js
Normal file
24
website/client-old/js/directives/task.directive.js
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
(function(){
|
||||
angular
|
||||
.module('habitrpg')
|
||||
.directive('task', task);
|
||||
|
||||
task.$inject = [
|
||||
'Shared',
|
||||
];
|
||||
|
||||
function task(Shared) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'templates/task.html',
|
||||
scope: true,
|
||||
link: function($scope, element, attrs) {
|
||||
$scope.getClasses = function (task, user, list, main) {
|
||||
return Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
Reference in New Issue
Block a user