Skip to content

Commit

Permalink
SAK-48171 - Gradebook: Grading cell popovers fail to display for new …
Browse files Browse the repository at this point in the history
…item added (sakaiproject#11323)

Co-authored-by: Sean Horner <[email protected]>
  • Loading branch information
hornersa and hornersa authored Mar 8, 2023
1 parent 4184bf6 commit 0590abf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gradebookng/tool/src/webapp/scripts/gradebook-gbgrade-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -3438,10 +3438,11 @@ GbGradeTable.focusColumnForAssignmentId = function(assignmentId, showPopupForNew
var $selectedField = $('.current.highlight .relative');

$selectedField.attr('data-bs-toggle','popover');
$selectedField.attr('data-placement','top');
$selectedField.attr('data-container','body');
$selectedField.attr('data-content',GbGradeTable.templates['newGradeItemPopoverMessage'].process());
$selectedField.attr('data-title',GbGradeTable.templates['newGradeItemPopoverTitle'].process());
$selectedField.attr('data-bs-placement','top');
$selectedField.attr('data-bs-container','body');
$selectedField.attr('data-bs-content',GbGradeTable.templates['newGradeItemPopoverMessage'].process());
$selectedField.attr('data-bs-title',GbGradeTable.templates['newGradeItemPopoverTitle'].process());
$selectedField.attr('data-bs-template','<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="mt-0 popover-header"></h3><div class="popover-body p-2"></div></div>');

$('body, button').on('click keyup touchend', function (e) {
if ($(e.target).data("bs-toggle") !== 'popover'
Expand All @@ -3451,7 +3452,7 @@ GbGradeTable.focusColumnForAssignmentId = function(assignmentId, showPopupForNew
});
}
})
(new bootstrap.Popover($selectedField[0])).show();
new bootstrap.Popover($selectedField[0]).show();
}
});
}
Expand Down

0 comments on commit 0590abf

Please sign in to comment.