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:
Blade Barringer 2015-02-03 10:29:36 -06:00
parent 1a8a688c61
commit 1e642fa4a8
3 changed files with 3 additions and 2 deletions

View file

@ -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";

View file

@ -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')

View file

@ -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