Skip to content
Snippets Groups Projects
Commit 9948a921 authored by srosse's avatar srosse
Browse files

OO-4254: fix HTML markup, add scope to flexi table <th> tags

parent c86e69c6
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,7 @@ class FlexiTableClassicRenderer extends AbstractFlexiTableRenderer implements Co ...@@ -80,7 +80,7 @@ class FlexiTableClassicRenderer extends AbstractFlexiTableRenderer implements Co
private void renderHeader(StringOutput sb, FlexiTableComponent ftC, FlexiColumnModel fcm, Translator translator) { private void renderHeader(StringOutput sb, FlexiTableComponent ftC, FlexiColumnModel fcm, Translator translator) {
String header = getHeader(fcm, translator); String header = getHeader(fcm, translator);
sb.append("<th"); sb.append("<th scope='col'");
if (fcm.getSortKey() != null || fcm.getHeaderAlignment() != null) { if (fcm.getSortKey() != null || fcm.getHeaderAlignment() != null) {
sb.append(" class='"); sb.append(" class='");
// append sort key to make column width set via css // append sort key to make column width set via css
...@@ -340,7 +340,7 @@ class FlexiTableClassicRenderer extends AbstractFlexiTableRenderer implements Co ...@@ -340,7 +340,7 @@ class FlexiTableClassicRenderer extends AbstractFlexiTableRenderer implements Co
Object cellValue = columnIndex >= 0 ? footerDataModel.getFooterValueAt(columnIndex) : null; Object cellValue = columnIndex >= 0 ? footerDataModel.getFooterValueAt(columnIndex) : null;
if(cellValue == null && !footerHeader) { if(cellValue == null && !footerHeader) {
String header = footerDataModel.getFooterHeader(); String header = footerDataModel.getFooterHeader();
target.append("<th>"); target.append("<th scope='row'>");
if(header != null) { if(header != null) {
target.append(header); target.append(header);
} }
......
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
#elseif($assignmentDueDateMsg) #elseif($assignmentDueDateMsg)
<div class="o_meta">$r.escapeHtml($assignmentDueDateMsg)</div> <div class="o_meta">$r.escapeHtml($assignmentDueDateMsg)</div>
#end #end
<div id="o_step_assignement_content" class="o_content collapse #if($collapse_assignement) in #end" aria-expanded="$collapse_assignement"> <div id="o_step_assignement_content" class="o_content collapse #if($collapse_assignement) in #end" aria-expanded="$collapse_assignement" role="region">
#if($r.available("assignedTask")) #if($r.available("assignedTask"))
$r.render("assignedTask") $r.render("assignedTask")
#else #else
<b>$r.translate("coach.waiting.assignment")</b> <strong>$r.translate("coach.waiting.assignment")</strong>
<br /> <br>
$r.translate("coach.waiting.assignment.description") $r.translate("coach.waiting.assignment.description")
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_assignement_content').on('hide.bs.collapse', function () { jQuery('#o_step_assignement_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","assignment") $r.backgroundCommand("hide","step","assignment")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","assignment") $r.backgroundCommand("show","step","assignment")
}) })
/* ]]> */</script> </script>
#end #end
#if($submitEnabled) #if($submitEnabled)
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
#elseif($submitDueDateMsg) #elseif($submitDueDateMsg)
<div class="o_meta">$r.escapeHtml($submitDueDateMsg)</div> <div class="o_meta">$r.escapeHtml($submitDueDateMsg)</div>
#end #end
<div id="o_step_submit_content" class="o_content collapse #if($collapse_submit) in #end" aria-expanded="$collapse_submit"> <div id="o_step_submit_content" class="o_content collapse #if($collapse_submit) in #end" aria-expanded="$collapse_submit" role="region">
#if($r.available("submittedDocs")) #if($r.available("submittedDocs"))
$r.render("submittedDocs") $r.render("submittedDocs")
#else #else
<b>$r.translate("coach.waiting.submitted.documents")</b> <strong>$r.translate("coach.waiting.submitted.documents")</strong>
<br /> <br>
#if($hasUploadedDocs) #if($hasUploadedDocs)
$r.translate("coach.waiting.submitted.documents.ready.description") $r.translate("coach.waiting.submitted.documents.ready.description")
#else #else
...@@ -76,20 +76,20 @@ ...@@ -76,20 +76,20 @@
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_submit_content').on('hide.bs.collapse', function () { jQuery('#o_step_submit_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","submit") $r.backgroundCommand("hide","step","submit")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","submit") $r.backgroundCommand("show","step","submit")
}) })
/* ]]> */</script> </script>
#end #end
#if($reviewAndCorrectionEnabled) #if($reviewAndCorrectionEnabled)
<div class="o_step $reviewCssClass"> <div class="o_step $reviewCssClass">
<div class="o_bar"></div> <div class="o_bar"></div>
<h4 class="o_title"> <a href="#o_step_review_content" data-toggle="collapse" aria-expanded="$collapse_reviewAndCorrection" #if(!$collapse_reviewAndCorrection) class="collapsed" #end>$r.translate("run.review")</a></h4> <h4 class="o_title"> <a href="#o_step_review_content" data-toggle="collapse" aria-expanded="$collapse_reviewAndCorrection" #if(!$collapse_reviewAndCorrection) class="collapsed" #end>$r.translate("run.review")</a></h4>
<div id="o_step_review_content" class="o_content collapse #if($collapse_reviewAndCorrection) in #end" aria-expanded="$collapse_reviewAndCorrection"> <div id="o_step_review_content" class="o_content collapse #if($collapse_reviewAndCorrection) in #end" aria-expanded="$collapse_reviewAndCorrection" role="region">
#if($r.available("corrections")) #if($r.available("corrections"))
<h5>$r.translate("coach.feedback.documents.title")</h5> <h5>$r.translate("coach.feedback.documents.title")</h5>
<p>$r.translate("coach.feedback.documents.desc")</p> <p>$r.translate("coach.feedback.documents.desc")</p>
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_review_content').on('hide.bs.collapse', function () { jQuery('#o_step_review_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","reviewAndCorrection") $r.backgroundCommand("hide","step","reviewAndCorrection")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","reviewAndCorrection") $r.backgroundCommand("show","step","reviewAndCorrection")
}) })
/* ]]> */</script> </script>
#end #end
#if($revisionEnabled && !$skipRevisions) #if($revisionEnabled && !$skipRevisions)
...@@ -127,19 +127,19 @@ ...@@ -127,19 +127,19 @@
#if($revisionDueDate) #if($revisionDueDate)
<div class="o_meta">$r.translate("run.revision.due.date", $revisionDueDate)</div> <div class="o_meta">$r.translate("run.revision.due.date", $revisionDueDate)</div>
#end #end
<div id="o_step_revision_content" class="o_content collapse #if($collapse_revision) in #end" aria-expanded="$collapse_revision"> <div id="o_step_revision_content" class="o_content collapse #if($collapse_revision) in #end" aria-expanded="$collapse_revision" role="region">
#if($r.available("revisionDocs")) #if($r.available("revisionDocs"))
$r.render("revisionDocs") $r.render("revisionDocs")
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_revision_content').on('hide.bs.collapse', function () { jQuery('#o_step_revision_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","revision") $r.backgroundCommand("hide","step","revision")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","revision") $r.backgroundCommand("show","step","revision")
}) })
/* ]]> */</script> </script>
#end #end
#if($solutionEnabled) #if($solutionEnabled)
...@@ -151,38 +151,38 @@ ...@@ -151,38 +151,38 @@
#elseif($solutionAvailableDateMsg) #elseif($solutionAvailableDateMsg)
<div class="o_meta">$r.escapeHtml($solutionAvailableDateMsg)</div> <div class="o_meta">$r.escapeHtml($solutionAvailableDateMsg)</div>
#end #end
<div id="o_step_solution_content" class="o_content collapse #if($collapse_solution) in #end" aria-expanded="$collapse_solution"> <div id="o_step_solution_content" class="o_content collapse #if($collapse_solution) in #end" aria-expanded="$collapse_solution" role="region">
#if($r.available("solutions")) #if($r.available("solutions"))
$r.render("solutions") $r.render("solutions")
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_solution_content').on('hide.bs.collapse', function () { jQuery('#o_step_solution_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","solution") $r.backgroundCommand("hide","step","solution")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","solution") $r.backgroundCommand("show","step","solution")
}) })
/* ]]> */</script> </script>
#end #end
#if($gradingEnabled) #if($gradingEnabled)
<div class="o_step $gradingCssClass"> <div class="o_step $gradingCssClass">
<div class="o_bar"></div> <div class="o_bar"></div>
<h4 class="o_title"> <a href="#o_step_grading_content" data-toggle="collapse" aria-expanded="$collapse_grading" #if(!$collapse_grading) class="collapsed" #end>$r.translate("run.grading")</a></h4> <h4 class="o_title"> <a href="#o_step_grading_content" data-toggle="collapse" aria-expanded="$collapse_grading" #if(!$collapse_grading) class="collapsed" #end>$r.translate("run.grading")</a></h4>
<div id="o_step_grading_content" class="o_content collapse #if($collapse_grading) in #end" aria-expanded="$collapse_grading"> <div id="o_step_grading_content" class="o_content collapse #if($collapse_grading) in #end" aria-expanded="$collapse_grading" role="region">
#if($r.available("grading")) #if($r.available("grading"))
$r.render("grading") $r.render("grading")
#end #end
</div> </div>
</div> </div>
<script>/* <![CDATA[ */ <script>
jQuery('#o_step_grading_content').on('hide.bs.collapse', function () { jQuery('#o_step_grading_content').on('hide.bs.collapse', function () {
$r.backgroundCommand("hide","step","grading") $r.backgroundCommand("hide","step","grading")
}).on('show.bs.collapse', function () { }).on('show.bs.collapse', function () {
$r.backgroundCommand("show","step","grading") $r.backgroundCommand("show","step","grading")
}) })
/* ]]> */</script> </script>
#end #end
</div> </div>
#if($r.visible("coach.reset.button")) #if($r.visible("coach.reset.button"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment