Several bugfixes and finishing touches

This commit is contained in:
Claude Brisson
2023-12-25 12:26:08 +01:00
parent 91e0bc839a
commit e33bc995c6
18 changed files with 264 additions and 38 deletions

View File

@@ -149,31 +149,35 @@
});
// prev/next round buttons
if (activeRound === 1) {
$('.prev-round').addClass('disabled');
}
if (activeRound === tour_rounds) {
$('.next-round').addClass('disabled');
}
$('.prev-round').on('click', e => {
let round = activeRound - 1;
if (round > 0) {
window.location.search = `id=${tour_id}&round=${round}`
if (typeof(activeRound) !== 'undefined') {
if (activeRound === 1) {
$('.prev-round').addClass('disabled');
}
});
$('.next-round').on('click', e => {
let round = activeRound + 1;
if (round <= tour_rounds) {
window.location.search = `id=${tour_id}&round=${round}`
if (activeRound === tour_rounds) {
$('.next-round').addClass('disabled');
}
});
$('.prev-round').on('click', e => {
let round = activeRound - 1;
if (round > 0) {
window.location.search = `id=${tour_id}&round=${round}`
}
});
$('.next-round').on('click', e => {
let round = activeRound + 1;
if (round <= tour_rounds) {
window.location.search = `id=${tour_id}&round=${round}`
}
});
}
});
// ]]#
#include('/js/tour-information.inc.js')
#include('/js/tour-registration.inc.js')
#include('/js/tour-pairing.inc.js')
#include('/js/tour-results.inc.js')
#include('/js/tour-standings.inc.js')
#if($tour)
#include('/js/tour-registration.inc.js')
#include('/js/tour-pairing.inc.js')
#include('/js/tour-results.inc.js')
#include('/js/tour-standings.inc.js')
#end
</script>
<div id="invalid_character" class="hidden">Invalid character</div>
<script type="text/javascript" src="/lib/datepicker-1.3.4/datepicker-full.min.js"></script>