Several bugfixes and finishing touches
This commit is contained in:
@@ -46,7 +46,7 @@ object StandingsHandler: PairgothApiHandler {
|
|||||||
RANK -> tournament.pairables.mapValues { it.value.rank }
|
RANK -> tournament.pairables.mapValues { it.value.rank }
|
||||||
RATING -> tournament.pairables.mapValues { it.value.rating }
|
RATING -> tournament.pairables.mapValues { it.value.rating }
|
||||||
NBW -> historyHelper.wins
|
NBW -> historyHelper.wins
|
||||||
MMS -> historyHelper.scores
|
MMS -> historyHelper.mms
|
||||||
STS -> nullMap
|
STS -> nullMap
|
||||||
CPS -> nullMap
|
CPS -> nullMap
|
||||||
|
|
||||||
|
@@ -142,7 +142,10 @@ object OpenGotha {
|
|||||||
country = player.country,
|
country = player.country,
|
||||||
club = player.club
|
club = player.club
|
||||||
).also {
|
).also {
|
||||||
canonicMap.put("${player.name}${player.firstName}".uppercase(Locale.ENGLISH), it.id)
|
player.participating.toString().forEachIndexed { i,c ->
|
||||||
|
if (c == '0') it.skip.add(i + 1)
|
||||||
|
}
|
||||||
|
canonicMap.put("${player.name.replace(" ", "")}${player.firstName.replace(" ", "")}".uppercase(Locale.ENGLISH), it.id)
|
||||||
}
|
}
|
||||||
}.associateByTo(tournament.players) { it.id }
|
}.associateByTo(tournament.players) { it.id }
|
||||||
val gamesPerRound = ogTournament.games.game.groupBy {
|
val gamesPerRound = ogTournament.games.game.groupBy {
|
||||||
@@ -155,7 +158,7 @@ object OpenGotha {
|
|||||||
black = canonicMap[game.blackPlayer] ?: throw Error("player not found: ${game.blackPlayer}"),
|
black = canonicMap[game.blackPlayer] ?: throw Error("player not found: ${game.blackPlayer}"),
|
||||||
white = canonicMap[game.whitePlayer] ?: throw Error("player not found: ${game.whitePlayer}"),
|
white = canonicMap[game.whitePlayer] ?: throw Error("player not found: ${game.whitePlayer}"),
|
||||||
handicap = game.handicap,
|
handicap = game.handicap,
|
||||||
result = when (game.result) {
|
result = when (game.result.removeSuffix("_BYDEF")) {
|
||||||
"RESULT_UNKNOWN" -> Game.Result.UNKNOWN
|
"RESULT_UNKNOWN" -> Game.Result.UNKNOWN
|
||||||
"RESULT_WHITEWINS" -> Game.Result.WHITE
|
"RESULT_WHITEWINS" -> Game.Result.WHITE
|
||||||
"RESULT_BLACKWINS" -> Game.Result.BLACK
|
"RESULT_BLACKWINS" -> Game.Result.BLACK
|
||||||
|
@@ -15,7 +15,7 @@ open class HistoryHelper(protected val history: List<List<Game>>, scoresGetter:
|
|||||||
else -> 0.0
|
else -> 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
val scores by lazy {
|
private val scores by lazy {
|
||||||
scoresGetter()
|
scoresGetter()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +76,9 @@ open class HistoryHelper(protected val history: List<List<Game>>, scoresGetter:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// define mms to be a synonym of scores
|
||||||
|
val mms by lazy { scores }
|
||||||
|
|
||||||
// SOS related functions given a score function
|
// SOS related functions given a score function
|
||||||
val sos by lazy {
|
val sos by lazy {
|
||||||
(history.flatten().map { game ->
|
(history.flatten().map { game ->
|
||||||
|
@@ -161,6 +161,11 @@
|
|||||||
<version>${servlet.api.version}</version>
|
<version>${servlet.api.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
</dependency>
|
||||||
<!-- proxy -->
|
<!-- proxy -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@@ -0,0 +1,53 @@
|
|||||||
|
package org.jeudego.pairgoth.util
|
||||||
|
|
||||||
|
import org.apache.commons.fileupload.FileItemIterator
|
||||||
|
import org.apache.commons.fileupload.FileItemStream
|
||||||
|
import org.apache.commons.fileupload.FileUploadException
|
||||||
|
import org.apache.commons.fileupload.servlet.ServletFileUpload
|
||||||
|
import org.apache.commons.fileupload.util.Streams
|
||||||
|
import org.apache.commons.lang3.StringUtils
|
||||||
|
import org.slf4j.LoggerFactory
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
|
import java.io.IOException
|
||||||
|
import java.io.InputStream
|
||||||
|
import javax.servlet.http.HttpServletRequest
|
||||||
|
|
||||||
|
object Upload {
|
||||||
|
internal var logger = LoggerFactory.getLogger("upload")
|
||||||
|
const val SIZE_RANDOM = 20
|
||||||
|
@Throws(IOException::class, FileUploadException::class)
|
||||||
|
fun handleFileUpload(request: HttpServletRequest): List<Pair<String, ByteArray>> {
|
||||||
|
// Check that we have a file upload request
|
||||||
|
val isMultipart: Boolean = ServletFileUpload.isMultipartContent(request)
|
||||||
|
if (!isMultipart) {
|
||||||
|
throw IOException("multipart content expected")
|
||||||
|
}
|
||||||
|
val files = mutableListOf<Pair<String, ByteArray>>()
|
||||||
|
|
||||||
|
// Create a new file upload handler
|
||||||
|
val upload = ServletFileUpload()
|
||||||
|
val iter: FileItemIterator = upload.getItemIterator(request)
|
||||||
|
|
||||||
|
// over all fields
|
||||||
|
while (iter.hasNext()) {
|
||||||
|
val item: FileItemStream = iter.next()
|
||||||
|
val name: String = item.fieldName
|
||||||
|
val stream: InputStream = item.openStream()
|
||||||
|
if (item.isFormField) {
|
||||||
|
// standard fields set into request attributes
|
||||||
|
request.setAttribute(name, Streams.asString(stream))
|
||||||
|
} else {
|
||||||
|
val filename: String = item.name
|
||||||
|
if (StringUtils.isEmpty(filename)) {
|
||||||
|
// ignoring empty file
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
val input: InputStream = item.openStream()
|
||||||
|
val bytes = ByteArrayOutputStream()
|
||||||
|
Streams.copy(input, bytes, true)
|
||||||
|
files.add(Pair(filename, bytes.toByteArray()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return files
|
||||||
|
}
|
||||||
|
}
|
@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory
|
|||||||
class ApiTool {
|
class ApiTool {
|
||||||
companion object {
|
companion object {
|
||||||
const val JSON = "application/json"
|
const val JSON = "application/json"
|
||||||
|
const val XML = "application/xml"
|
||||||
val apiRoot = System.getProperty("pairgoth.api.external.url")?.let { "${it.removeSuffix("/")}/" }
|
val apiRoot = System.getProperty("pairgoth.api.external.url")?.let { "${it.removeSuffix("/")}/" }
|
||||||
?: throw Error("no configured API url")
|
?: throw Error("no configured API url")
|
||||||
val logger = LoggerFactory.getLogger("api")
|
val logger = LoggerFactory.getLogger("api")
|
||||||
@@ -50,4 +51,7 @@ class ApiTool {
|
|||||||
fun delete(url: String, payload: Json? = null) = prepare(url)
|
fun delete(url: String, payload: Json? = null) = prepare(url)
|
||||||
.delete(payload?.toRequestBody() ?: EMPTY_REQUEST)
|
.delete(payload?.toRequestBody() ?: EMPTY_REQUEST)
|
||||||
.process()
|
.process()
|
||||||
|
|
||||||
|
fun post(url: String, xml: String) =
|
||||||
|
prepare(url).post(xml.toRequestBody(XML.toMediaType())).process()
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,28 @@
|
|||||||
|
package org.jeudego.pairgoth.web
|
||||||
|
|
||||||
|
import org.jeudego.pairgoth.util.Upload
|
||||||
|
import org.jeudego.pairgoth.view.ApiTool
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
|
import javax.servlet.http.HttpServlet
|
||||||
|
import javax.servlet.http.HttpServletRequest
|
||||||
|
import javax.servlet.http.HttpServletResponse
|
||||||
|
|
||||||
|
class ImportServlet: HttpServlet() {
|
||||||
|
|
||||||
|
private val api = ApiTool()
|
||||||
|
|
||||||
|
override fun doPost(req: HttpServletRequest, resp: HttpServletResponse) {
|
||||||
|
val uploads = Upload.handleFileUpload(req)
|
||||||
|
if (uploads.size != 1) resp.sendError(HttpServletResponse.SC_BAD_REQUEST)
|
||||||
|
else {
|
||||||
|
val xml = uploads.first().second.toString(StandardCharsets.UTF_8)
|
||||||
|
val apiResp = api.post("tour", xml)
|
||||||
|
if (apiResp.isObject && apiResp.asObject().getBoolean("success") == true) {
|
||||||
|
resp.contentType = "application/json; charset=UTF-8"
|
||||||
|
resp.writer.println(apiResp.toString())
|
||||||
|
} else {
|
||||||
|
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -54,7 +54,8 @@ class LanguageFilter : Filter {
|
|||||||
} else {
|
} else {
|
||||||
// the request must be redirected
|
// the request must be redirected
|
||||||
val destination = if (askedLanguage != null) target else uri
|
val destination = if (askedLanguage != null) target else uri
|
||||||
response.sendRedirect("/${preferredLanguage}${destination}")
|
val query = request.queryString ?: ""
|
||||||
|
response.sendRedirect("/${preferredLanguage}${destination}${if (query.isEmpty()) "" else "?$query"}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
view-webapp/src/main/sass/index.scss
Normal file
8
view-webapp/src/main/sass/index.scss
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
@layer pairgoth {
|
||||||
|
.tournaments.section {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
gap: 1em;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
@@ -320,6 +320,7 @@
|
|||||||
max-height: inherit;
|
max-height: inherit;
|
||||||
}
|
}
|
||||||
.popup-footer {
|
.popup-footer {
|
||||||
|
margin-top: 1em;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -343,4 +344,9 @@
|
|||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
.toggle {
|
.toggle {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
input {
|
input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
height: 26px;
|
height: 26px;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
background-color: #F7D6A3;
|
background-color: #F7D6A3;
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
*#
|
*#
|
||||||
<div id="header" class="horz flex">
|
<div id="header" class="horz flex">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<img src="/img/logov2.svg"/>
|
<a href="/"><img src="/img/logov2.svg"/></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="title">
|
<div id="title">
|
||||||
</div>
|
</div>
|
||||||
|
@@ -71,6 +71,12 @@
|
|||||||
<load-on-startup>1</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
<async-supported>true</async-supported>
|
<async-supported>true</async-supported>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>import</servlet-name>
|
||||||
|
<servlet-class>org.jeudego.pairgoth.web.ImportServlet</servlet-class>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
|
<async-supported>true</async-supported>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
<!-- servlet mappings -->
|
<!-- servlet mappings -->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
@@ -89,6 +95,10 @@
|
|||||||
<servlet-name>search</servlet-name>
|
<servlet-name>search</servlet-name>
|
||||||
<url-pattern>/api/search/*</url-pattern>
|
<url-pattern>/api/search/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>import</servlet-name>
|
||||||
|
<url-pattern>/api/import/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- context params -->
|
<!-- context params -->
|
||||||
<context-param>
|
<context-param>
|
||||||
|
@@ -1,15 +1,79 @@
|
|||||||
<div class="section">
|
<div class="actions section">
|
||||||
<a href="tour" class="ui blue icon floating button">
|
<a href="tour" class="ui blue icon floating button">
|
||||||
<i class="fa fa-plus-square-o"></i>
|
<i class="fa fa-plus-square-o"></i>
|
||||||
New tournament
|
New tournament
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<a id="import-tournament" class="ui orange icon floating button">
|
||||||
#foreach($tour in $api.get('tour').entrySet())
|
<i class="fa fa-upload"></i>
|
||||||
<div class="section">
|
Import tournament
|
||||||
$tour
|
|
||||||
<a href="tour?id=${tour.key}" class="ui open basic secondary white icon floating button">
|
|
||||||
<i class="fa fa-folder-open-o"></i>
|
|
||||||
Open
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tournaments section">
|
||||||
|
#foreach($tour in $api.get('tour').entrySet())
|
||||||
|
<a href="tour?id=${tour.key}" class="ui open basic secondary white icon floating button">
|
||||||
|
<i class="fa fa-folder-open-o"></i>
|
||||||
|
$tour.value
|
||||||
|
</a>
|
||||||
#end
|
#end
|
||||||
|
</div>
|
||||||
|
<div id="import-popup" class="popup">
|
||||||
|
<div class="popup-body">
|
||||||
|
<form id="import-form" class="ui form">
|
||||||
|
<div class="popup-content">
|
||||||
|
<div class="field">
|
||||||
|
<label>OpenGotha file</label>
|
||||||
|
<input type="file" name="file" accept=".xml"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="popup-footer">
|
||||||
|
<button id="cancel-import" type="button" class="ui gray right labeled icon floating close button">
|
||||||
|
<i class="times icon"></i>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button id="import" type="button" class="ui green right labeled icon floating button">
|
||||||
|
<i class="plus icon"></i>
|
||||||
|
Import
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// #[[
|
||||||
|
function doImport() {
|
||||||
|
let form = $('#import-form')[0];
|
||||||
|
let formData = new FormData(form);
|
||||||
|
fetch('/api/import', {
|
||||||
|
method: 'POST',
|
||||||
|
body: formData
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.ok) return resp.json();
|
||||||
|
else throw resp;
|
||||||
|
}).then(json => {
|
||||||
|
if (json.success) {
|
||||||
|
console.log(`/tour?id=${json.id}`)
|
||||||
|
document.location.href = `/tour?id=${json.id}`
|
||||||
|
} else {
|
||||||
|
showError(json.error || 'unknown error')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
error(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(()=>{
|
||||||
|
$('#import-tournament').on('click', e => {
|
||||||
|
modal('import-popup');
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$('#import').on('click', e => {
|
||||||
|
let files = $('#import-form input')[0].files;
|
||||||
|
if (files.length > 0) {
|
||||||
|
doImport();
|
||||||
|
} else showError('no file choosen');
|
||||||
|
close_modal();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// ]]#
|
||||||
|
</script>
|
||||||
|
@@ -163,6 +163,34 @@ function close_modal() {
|
|||||||
$(`.popup`).removeClass('shown');
|
$(`.popup`).removeClass('shown');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function screenshot() {
|
||||||
|
const bodyContent = document.body.innerHTML;
|
||||||
|
|
||||||
|
// Create an SVG element
|
||||||
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||||
|
svg.setAttribute('width', window.innerWidth);
|
||||||
|
svg.setAttribute('height', window.innerHeight);
|
||||||
|
|
||||||
|
// Create a foreignObject element
|
||||||
|
const foreignObject = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
|
||||||
|
foreignObject.setAttribute('width', '100%');
|
||||||
|
foreignObject.setAttribute('height', '100%');
|
||||||
|
|
||||||
|
// Append the body content to foreignObject
|
||||||
|
foreignObject.innerHTML = bodyContent;
|
||||||
|
|
||||||
|
// Append foreignObject to the SVG
|
||||||
|
svg.appendChild(foreignObject);
|
||||||
|
|
||||||
|
// Create a data URL from the SVG
|
||||||
|
const dataUrl = 'data:image/svg+xml,' + encodeURIComponent(new XMLSerializer().serializeToString(svg));
|
||||||
|
|
||||||
|
// Open the screenshot in a new window/tab (optional)
|
||||||
|
const screenshotWindow = window.open();
|
||||||
|
screenshotWindow.document.write('<img src="' + dataUrl + '" alt="Screenshot">');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
$('button.close').on('click', e => {
|
$('button.close').on('click', e => {
|
||||||
let modal = e.target.closest('.popup');
|
let modal = e.target.closest('.popup');
|
||||||
@@ -223,5 +251,13 @@ onLoad(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// disable hash scrolling
|
||||||
|
if (window.location.hash) {
|
||||||
|
console.log("lkhjqlksjdhflkqsjhfd")
|
||||||
|
setTimeout(function() {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ function search(needle) {
|
|||||||
let html = resultTemplate.render(result);
|
let html = resultTemplate.render(result);
|
||||||
$('#search-result')[0].innerHTML = html;
|
$('#search-result')[0].innerHTML = html;
|
||||||
} else console.log(result);
|
} else console.log(result);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#search-result').clear();
|
$('#search-result').clear();
|
||||||
searchTimer = undefined;
|
searchTimer = undefined;
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
<th>Plc</th>
|
<th>Plc</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Rank</th>
|
<th>Rank</th>
|
||||||
<th>Cntry</th>
|
<th>Ctr</th>
|
||||||
<th>Nbw</th>
|
<th>Nbw</th>
|
||||||
#foreach($r in [1..$round])
|
#foreach($r in [1..$round])
|
||||||
<th>R$r</th>
|
<th>R$r</th>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<td>$part.num</td>
|
<td>$part.num</td>
|
||||||
<td>$part.place</td>
|
<td>$part.place</td>
|
||||||
<td>$part.name $part.firstname</td>
|
<td>$part.name $part.firstname</td>
|
||||||
<td>$part.rank</td>
|
<td>#rank($part.rank)</td>
|
||||||
<td>$part.country</td>
|
<td>$part.country</td>
|
||||||
<td>$part.NBW</td>
|
<td>$part.NBW</td>
|
||||||
#set($mx = $round - 1)
|
#set($mx = $round - 1)
|
||||||
|
@@ -149,31 +149,35 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// prev/next round buttons
|
// prev/next round buttons
|
||||||
if (activeRound === 1) {
|
if (typeof(activeRound) !== 'undefined') {
|
||||||
$('.prev-round').addClass('disabled');
|
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 (activeRound === tour_rounds) {
|
||||||
$('.next-round').on('click', e => {
|
$('.next-round').addClass('disabled');
|
||||||
let round = activeRound + 1;
|
|
||||||
if (round <= tour_rounds) {
|
|
||||||
window.location.search = `id=${tour_id}&round=${round}`
|
|
||||||
}
|
}
|
||||||
});
|
$('.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-information.inc.js')
|
||||||
#include('/js/tour-registration.inc.js')
|
#if($tour)
|
||||||
#include('/js/tour-pairing.inc.js')
|
#include('/js/tour-registration.inc.js')
|
||||||
#include('/js/tour-results.inc.js')
|
#include('/js/tour-pairing.inc.js')
|
||||||
#include('/js/tour-standings.inc.js')
|
#include('/js/tour-results.inc.js')
|
||||||
|
#include('/js/tour-standings.inc.js')
|
||||||
|
#end
|
||||||
</script>
|
</script>
|
||||||
<div id="invalid_character" class="hidden">Invalid character</div>
|
<div id="invalid_character" class="hidden">Invalid character</div>
|
||||||
<script type="text/javascript" src="/lib/datepicker-1.3.4/datepicker-full.min.js"></script>
|
<script type="text/javascript" src="/lib/datepicker-1.3.4/datepicker-full.min.js"></script>
|
||||||
|
Reference in New Issue
Block a user