Revize 863ca316
Přidáno uživatelem Martin Sebela před více než 3 roky(ů)
website/public/js/zcu-heatmap.js | ||
---|---|---|
51 | 51 |
if (time !== null) { |
52 | 52 |
currentTime = time |
53 | 53 |
} else { |
54 |
$('#dropdown-time input[type="radio"]:checked').each(function () { |
|
55 |
currentTime = parseInt($(this).val()) |
|
56 |
}) |
|
54 |
currentTime = parseInt($('#dropdown-time input[type="radio"]:checked').val()) |
|
57 | 55 |
} |
58 | 56 |
} |
59 | 57 |
|
... | ... | |
63 | 61 |
} else { |
64 | 62 |
currentDate = new Date($('#date').val()) |
65 | 63 |
} |
66 |
$('#player-date span').html(`${currentDate.getDate()}. ${currentDate.getMonth() + 1}. ${currentDate.getFullYear()}`) |
|
64 |
|
|
67 | 65 |
$('#date').val(currentDateToString()) |
66 |
$('#player-date span').html(`${currentDate.getDate()}. ${currentDate.getMonth() + 1}. ${currentDate.getFullYear()}`) |
|
67 |
|
|
68 | 68 |
data = [] |
69 | 69 |
} |
70 | 70 |
const currentDayToString = () => { |
... | ... | |
368 | 368 |
isAnimationRunning = !isAnimationRunning |
369 | 369 |
|
370 | 370 |
if (isAnimationRunning) { |
371 |
$('#play-pause').attr('class', 'pause')
|
|
371 |
$('#animate-btn').removeClass('play').addClass('pause')
|
|
372 | 372 |
timer = setInterval(function () { next() }, 800) |
373 | 373 |
} else { |
374 | 374 |
clearTimeout(timer) |
375 |
$('#play-pause').attr('class', 'play')
|
|
375 |
$('#animate-btn').removeClass('pause').addClass('play')
|
|
376 | 376 |
} |
377 | 377 |
} |
378 | 378 |
|
... | ... | |
424 | 424 |
} |
425 | 425 |
|
426 | 426 |
function setTimeline () { |
427 |
$('#timeline').text(currentTime + ':00')
|
|
428 |
$('#timeline').attr('class', 'time hour-' + currentTime)
|
|
427 |
$('#player-time').text(currentTime + ':00')
|
|
428 |
$('#player-time').attr('class', 'time hour-' + currentTime)
|
|
429 | 429 |
} |
430 |
|
|
430 | 431 |
const onChangeHour = (hour) => { |
431 | 432 |
changeHour(hour) |
432 | 433 |
drawHeatmap(data[currentTime]) |
433 | 434 |
} |
435 |
|
|
434 | 436 |
const changeHour = (hour) => { |
435 | 437 |
changeCurrentTime(hour) |
436 | 438 |
updateHeaderControls() |
Také k dispozici: Unified diff
Re #8159 - new, fixed buttons, CSS improvements, refactoring