mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
Closed #4616. Added modal attribute habitrpg-tasks directive to
determine whether modals should be appended to body or to the task
This commit is contained in:
parent
1a8a688c61
commit
1e642fa4a8
3 changed files with 3 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ habitrpg
|
|||
link: function(scope, element, attrs) {
|
||||
// $scope.obj needs to come from controllers, so we can pass by ref
|
||||
scope.main = attrs.main;
|
||||
scope.modal = attrs.modal;
|
||||
var dailiesView;
|
||||
if(User.user.preferences.dailyDueDefaultView) {
|
||||
dailiesView = "remaining";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.me
|
|||
button.close(type='button', ng-click='$state.go("^")', aria-hidden='true') ×
|
||||
h3 {{obj.profile.name}}
|
||||
.modal-body
|
||||
habitrpg-tasks(main=false)
|
||||
habitrpg-tasks(main=false, modal='true')
|
||||
.modal-footer
|
||||
a.btn.btn-default(ng-click='$state.go("^")')=env.t('close')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
li(bindonce='list', bo-id='"task-"+task.id', ng-repeat='task in obj[list.type+"s"]', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward")}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='true', ng-show='shouldShow(task, list, user.preferences)')
|
||||
li(bindonce='list', bo-id='"task-"+task.id', ng-repeat='task in obj[list.type+"s"]', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward")}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='{{::modal ? "false":"true"}}', ng-show='shouldShow(task, list, user.preferences)')
|
||||
// right-hand side control buttons
|
||||
.task-meta-controls
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue