Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,17 @@ td .progress {

#session-summary {
margin: 20px 0;
}
}

/*
* Bootstrap styles select.custom-select elements with an inline SVG arrow
* loaded from a data: URI background image, which the default
* Content-Security-Policy (img-src 'self') blocks:
* https://getbootstrap.com/docs/4.6/components/input-group/#custom-select
* Fall back to the browser's native <select> appearance instead.
*/
.custom-select {
appearance: auto;
background: #fff;
padding-right: .75rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,16 @@ function divWrap(inner) {

function progressBar(double) {
var cent = +(double * 100).toFixed(3);
return '<div class="progress"><div class="progress-bar" style="width:'
+ cent + '%"><span>' + cent + '%</span></div></div>';
return '<div class="progress"><div class="progress-bar" data-width="'
+ cent + '"><span>' + cent + '%</span></div></div>';
}

// Inline style attributes are blocked by the default Content-Security-Policy,
// so progress bar widths are applied through CSSOM instead.
function applyProgressBarWidths(container) {
$(container).find(".progress-bar[data-width]").each(function() {
this.style.width = $(this).attr("data-width") + "%";
});
}

function getPathArray() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ function loadStatementsTable(statements) {
"</tr>"
);
});
applyProgressBarWidths("#session-statements .statements-table-body");
}

$(document).ready(function () {
Expand Down
Loading