mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Day calendar: Fix missing current-time-bar back for all browsers (#2342)
This commit is contained in:
committed by
GitHub
parent
8254d8f5cc
commit
475a5be351
@@ -513,29 +513,31 @@ $(function () {
|
|||||||
var c = parseInt(this.getAttribute("data-concurrency"), 10);
|
var c = parseInt(this.getAttribute("data-concurrency"), 10);
|
||||||
if (c > 9) this.style.setProperty('--concurrency', c);
|
if (c > 9) this.style.setProperty('--concurrency', c);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".day-calendar").each(function() {
|
$(".day-calendar").each(function() {
|
||||||
var s = window.getComputedStyle($(".day-timeline > li").get(0));
|
|
||||||
|
|
||||||
if (s.getPropertyValue('grid-column-start') != "auto") return;
|
|
||||||
// Fix Chrome not being able to use calc-division in grid
|
// Fix Chrome not being able to use calc-division in grid
|
||||||
$(".day-calendar").each(function() {
|
var s = window.getComputedStyle($(".day-timeline > li").get(0));
|
||||||
var rasterSize = this.getAttribute("data-raster-size");
|
if (s.getPropertyValue('grid-column-start') != "auto") return;
|
||||||
|
|
||||||
|
var rasterSize = this.getAttribute("data-raster-size");
|
||||||
|
var duration = this.getAttribute("data-duration").split(":");
|
||||||
|
var cols = duration[0]*60/rasterSize + duration[1]/rasterSize;
|
||||||
|
|
||||||
|
$(".day-timeline", this).css("grid-template-columns", "repeat(" + cols + ", minmax(var(--col-min-size, 3em), 1fr))");
|
||||||
|
|
||||||
|
$(".day-timeline > li", this).each(function() {
|
||||||
|
var s = window.getComputedStyle(this);
|
||||||
|
|
||||||
|
var offset = this.getAttribute("data-offset").split(":");
|
||||||
var duration = this.getAttribute("data-duration").split(":");
|
var duration = this.getAttribute("data-duration").split(":");
|
||||||
var cols = duration[0]*60/rasterSize + duration[1]/rasterSize;
|
|
||||||
|
|
||||||
$(".day-timeline", this).css("grid-template-columns", "repeat(" + cols + ", minmax(var(--col-min-size, 3em), 1fr))");
|
var columnStart = 1 + offset[0]*60/rasterSize + offset[1]/rasterSize;
|
||||||
|
var columnSpan = duration[0]*60/rasterSize + duration[1]/rasterSize
|
||||||
$(".day-timeline > li", this).each(function() {
|
this.style.gridColumn = columnStart + " / span " + columnSpan;
|
||||||
var s = window.getComputedStyle(this);
|
|
||||||
|
|
||||||
var offset = this.getAttribute("data-offset").split(":");
|
|
||||||
var duration = this.getAttribute("data-duration").split(":");
|
|
||||||
|
|
||||||
var columnStart = 1 + offset[0]*60/rasterSize + offset[1]/rasterSize;
|
|
||||||
var columnSpan = duration[0]*60/rasterSize + duration[1]/rasterSize
|
|
||||||
this.style.gridColumn = columnStart + " / span " + columnSpan;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".day-calendar").each(function() {
|
||||||
|
|
||||||
var timezone = this.getAttribute("data-timezone");
|
var timezone = this.getAttribute("data-timezone");
|
||||||
var startTime = moment.tz(this.getAttribute("data-start"), timezone);
|
var startTime = moment.tz(this.getAttribute("data-start"), timezone);
|
||||||
|
|||||||
Reference in New Issue
Block a user