Fix tabs
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
});
|
||||
// ]]#
|
||||
</script>
|
||||
<style>
|
||||
body.initial {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="vert flex initial">
|
||||
#* Debugging code to list all web context properties
|
||||
|
@@ -253,7 +253,6 @@ onLoad(() => {
|
||||
|
||||
// disable hash scrolling
|
||||
if (window.location.hash) {
|
||||
console.log("lkhjqlksjdhflkqsjhfd")
|
||||
setTimeout(function() {
|
||||
window.scrollTo(0, 0);
|
||||
}, 1);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<div id="information" #if($tour)class="tab-content"#end>
|
||||
<div id="information-tab" #if($tour)class="tab-content"#end>
|
||||
<form id="tournament-infos" class="ui form #if(!$tour)edit#end">
|
||||
<div class="roundbox">
|
||||
<div class="two stackable fields">
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#set($games = $roundPairing.games)
|
||||
#set($unpairables = $roundPairing.unpairables)
|
||||
#end
|
||||
<div class="tab-content" id="pairing">
|
||||
<div class="tab-content" id="pairing-tab">
|
||||
<div id="pairing-content">
|
||||
<div id="pairing-round" class="active-round-box">
|
||||
Pairings for round
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<div class="tab-content" id="registration">
|
||||
<div class="tab-content" id="registration-tab">
|
||||
<div id="reg-view">
|
||||
<div id="players-list" class="roundbox">
|
||||
#set($parts = $api.get("tour/${params.id}/part"))
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<div class="tab-content" id="results">
|
||||
<div class="tab-content" id="results-tab">
|
||||
<div id="results-round" class="active-round-box">
|
||||
Results for round
|
||||
<button class="ui floating choose-round prev-round button">«</button>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#end
|
||||
</select>
|
||||
#end
|
||||
<div class="tab-content" id="standings">
|
||||
<div class="tab-content" id="standings-tab">
|
||||
<div id="standings-round" class="active-round-box">
|
||||
Standings after round
|
||||
<button class="ui floating choose-round prev-round button">«</button>
|
||||
|
@@ -92,7 +92,7 @@
|
||||
let date = Datepicker.parseDate(value, 'yyyy-mm-dd', datepickerLocale);
|
||||
return Datepicker.formatDate(date, format)
|
||||
}
|
||||
function fromHMS(value) {$('.step').map(item => item.data('step')).forEach(i => console.log(i))
|
||||
function fromHMS(value) {
|
||||
if (value && /\d+:\d+:\d+/.test(value)) {
|
||||
let parts = value.split(':');
|
||||
let seconds = parts[0] * 3600 + parts[1] * 60 + parts[2] * 1;
|
||||
@@ -105,7 +105,7 @@
|
||||
function chooseStep(step) {
|
||||
$('.tab-content').removeClass('active');
|
||||
$('.step').removeClass('active');
|
||||
$(`.step[data-step="${step}"], #${step}`).addClass('active');
|
||||
$(`.step[data-step="${step}"], #${step}-tab`).addClass('active');
|
||||
window.location.hash = `#${step}`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user