Skip to content

Commit

Permalink
Closed #4616. Added modal attribute habitrpg-tasks directive to
Browse files Browse the repository at this point in the history
determine whether modals should be appended to body or to the task
  • Loading branch information
crookedneighbor committed Feb 3, 2015
1 parent 1a8a688 commit 1e642fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions public/js/directives/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion views/options/social/challenges.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion views/shared/tasks/task.jade
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 1e642fa

Please sign in to comment.