Skip to content

Commit

Permalink
SAK-50622 Gradebook Tabulator migration fix broken buttons, sorters, …
Browse files Browse the repository at this point in the history
…dark mode and console errors (#12984)
  • Loading branch information
kunaljaykam authored Oct 29, 2024
1 parent f62c764 commit 2762abd
Show file tree
Hide file tree
Showing 5 changed files with 289 additions and 388 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>

<script id="courseGradeHeaderTemplate" type="text/template">
<span class="colHeader d-none" data-col-index="${colIndex}">${colIndex}</span>
<span class="colHeader d-none"></span>
<div class="relative">
<a class="gb-title d-block overflow-hidden text-truncate" wicket:message="title:sortbygrade,aria-label:sortbygrade">
<wicket:message key="column.header.coursegrade"/>
Expand Down Expand Up @@ -68,7 +68,7 @@
</div>
</script>
<script id="assignmentHeaderTemplate" type="text/template">
<span class="colHeader d-none" data-col-index="${colIndex}">${colIndex}</span>
<span class="colHeader d-none"></span>
<div class="relative">
{if extraCredit}
<span class="gb-flag-extra-credit" wicket:message="title:label.gradeitem.extracredit"></span>
Expand Down Expand Up @@ -171,7 +171,7 @@
</div>
</script>
<script id="categoryScoreHeaderTemplate" type="text/template">
<span class="colHeader d-none" data-col-index="${colIndex}">${colIndex}</span>
<span class="colHeader d-none"></span>
<div class="relative">
{if getExtraCredit}
<span class="gb-flag-extra-credit" wicket:message="title:label.gradeitem.extracreditcategory"></span>
Expand Down Expand Up @@ -223,21 +223,21 @@
</script>
<script id="studentHeaderTemplate" type="text/template">
<div class="relative">
<div class="colHeader" data-col-index="${colIndex}">
<div class="colHeader">
<a class="gb-title d-block overflow-hidden text-truncate" wicket:message="title:sortbyname,aria-label:sortbyname">
<wicket:message key="column.header.students"/>
</a>
<div class="dropdown dropend position-absolute top-0 end-0">
<button type="button"
class="btn btn-sm btn-default bi bi-gear-fill"
data-bs-toggle="dropdown"
data-bs-popper-config='{"strategy": "fixed"}'
data-bs-popper="static"
aria-haspopup="true"
aria-expanded="false"
wicket:message="title:students.menulabel"
tabindex="-1">
</button>
<ul class="dropdown-menu">
<ul class="dropdown-menu" data-bs-popper="static" data-bs-placement="left-start">
{if !settings.isStudentOrderedByLastName}
<li><a class="gb-student-name-order-toggle dropdown-item" data-order-by="last_name" href="#"><wicket:message key="sortbyname.option.last"/></a></li>
{/if}
Expand All @@ -251,7 +251,7 @@
</script>
<script id="studentNumberHeaderTemplate" type="text/template">
<div class="relative">
<div class="colHeader" data-col-index="${colIndex}">
<div class="colHeader">
<a class="gb-title" wicket:message="title:label.gradeitem.studentnumberheadertooltip,aria-label:label.gradeitem.studentnumberheadertooltip">
<wicket:message key="column.header.studentNumber"/>
</a>
Expand All @@ -269,7 +269,7 @@
</script>
<script id="sectionsHeaderTemplate" type="text/template">
<div class="relative">
<div class="colHeader" data-col-index="${colIndex}">
<div class="colHeader">
<a class="gb-title" wicket:message="title:label.gradeitem.sectionsheadertooltip,aria-label:label.gradeitem.sectionsheadertooltip">
<wicket:message key="column.header.sections"/>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void onInitialize() {
final GbAjaxButton submit = new GbAjaxButton("submit") {
@Override
public void onSubmit(final AjaxRequestTarget target) {
target.appendJavaScript(String.format("GbGradeTable.instance.setDataAtCell(rubricGradingRow, rubricGradingCol, rubricGradingPoints.toString());", studentUuid, assignmentId));
target.appendJavaScript(String.format("GbGradeTable.instance.getRows()[rubricGradingRow].getCells()[rubricGradingCol].setValue(rubricGradingPoints.toString());", studentUuid, assignmentId));
RubricGradePanel.this.window.close(target);
}
};
Expand Down
Loading

0 comments on commit 2762abd

Please sign in to comment.