mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Task notes modals (#8521)
* Merged in develop * Show task notes modal on click * Began adding tests * Removed extra characters * Fixed lingering popup * Added markdown * Fixed line endings
This commit is contained in:
@@ -1,24 +1,41 @@
|
||||
'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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
'use strict';
|
||||
|
||||
(function(){
|
||||
angular
|
||||
.module('habitrpg')
|
||||
.directive('task', task);
|
||||
|
||||
task.$inject = [
|
||||
'Shared',
|
||||
'$modal',
|
||||
];
|
||||
|
||||
function task(Shared, $modal) {
|
||||
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);
|
||||
}
|
||||
|
||||
$scope.showNoteDetails = function (task) {
|
||||
task.popoverOpen = false;
|
||||
|
||||
$modal.open({
|
||||
templateUrl: 'modals/task-extra-notes.html',
|
||||
controller: function ($scope, task) {
|
||||
$scope.task = task;
|
||||
},
|
||||
resolve: {
|
||||
task: function() {
|
||||
return task;
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user