Refactor exam scores user template to unify view button class for consistency
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="text-end ms-3">
|
||||
{% if exam.publish_results %}
|
||||
<button type="button" class="btn btn-sm btn-outline-primary" data-qn={{forloop.counter0}}>View</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary view-question-button" data-qn={{forloop.counter0}}>View</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" disabled>View</button>
|
||||
{% endif %}
|
||||
@@ -88,7 +88,7 @@
|
||||
$(document).ready(function () {
|
||||
$("#hide-viewer").on('click', function(){ $('.viewer-block .viewer-body').toggle(); });
|
||||
|
||||
$(".view-question-link").on("click", function (e) {
|
||||
$(".view-question-button").on("click", function (e) {
|
||||
question_number = e.currentTarget.dataset.qn;
|
||||
$("#single-dicom-viewer").empty();
|
||||
$.ajax({
|
||||
@@ -113,8 +113,8 @@
|
||||
.always(function () { console.log('[Done]'); });
|
||||
});
|
||||
|
||||
// auto-click first view link to populate viewer
|
||||
const firstView = $(".view-question-link").first();
|
||||
// auto-click first view button to populate viewer
|
||||
const firstView = $(".view-question-button").first();
|
||||
if(firstView.length){ firstView.click(); }
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user