diff --git a/standalone.sh b/standalone.sh index 8d12f47..969c3d4 100755 --- a/standalone.sh +++ b/standalone.sh @@ -3,4 +3,4 @@ # debug version # mvn package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006 -jar application/target/pairgoth-engine.jar -mvn -DskipTests=true package && java -Dpairgoth.mode=standalone -jar application/target/pairgoth-engine.jar +mvn -DskipTests=true package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Dpairgoth.mode=standalone -jar application/target/pairgoth-engine.jar diff --git a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/ApiTool.kt b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/ApiTool.kt index 793d767..69d6170 100644 --- a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/ApiTool.kt +++ b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/ApiTool.kt @@ -26,7 +26,7 @@ class ApiTool { fun setRequest(req: HttpServletRequest) { request = req } - private fun getBearer() = AuthFilter.getBearer(request) + fun getBearer() = AuthFilter.getBearer(request) private val client = OkHttpClient() private fun prepare(url: String) = diff --git a/view-webapp/src/main/webapp/WEB-INF/translations/fr b/view-webapp/src/main/webapp/WEB-INF/translations/fr index 0e6eb5b..745da91 100644 --- a/view-webapp/src/main/webapp/WEB-INF/translations/fr +++ b/view-webapp/src/main/webapp/WEB-INF/translations/fr @@ -88,7 +88,7 @@ Rengo with 2 players teams Rengo par équipes de 2 Rengo with 3 players team Rengo par équipes de 3 Renumber Renuméroter Required field Champs requis -Reset Mac Mahon groups Réinitialiser les groupes Mac Mahon +Reset Réinitialiser Results Résultats Results for round Résultats pour la ronde Round-robin Toutes rondes diff --git a/view-webapp/src/main/webapp/js/main.js b/view-webapp/src/main/webapp/js/main.js index 8df9a91..fb75ffc 100644 --- a/view-webapp/src/main/webapp/js/main.js +++ b/view-webapp/src/main/webapp/js/main.js @@ -110,6 +110,7 @@ HTMLFormElement.prototype.val = function(name, value) { let ctl = this.find(`[name="${name}"]`)[0]; if (!ctl) { console.error(`unknown input name: ${name}`) + return undefined } let tag = ctl.tagName; let type = tag === 'INPUT' ? ctl.attr('type') : undefined; diff --git a/view-webapp/src/main/webapp/js/tour-registration.inc.js b/view-webapp/src/main/webapp/js/tour-registration.inc.js index a01df0b..5685510 100644 --- a/view-webapp/src/main/webapp/js/tour-registration.inc.js +++ b/view-webapp/src/main/webapp/js/tour-registration.inc.js @@ -94,8 +94,9 @@ function addPlayers() { // initial search checkboxes position ['countryFilter', 'aga', 'egf', 'ffg'].forEach(id => { let value = store(id); - if (value !== null && typeof(value) !== 'undefined') { - $(`#${id}`)[0].checked = value; + let ctl = $(`#${id}`); + if (value !== null && typeof(value) !== 'undefined' && ctl.length) { + ctl[0].checked = value; } }); form.val('final', status); @@ -250,10 +251,13 @@ onLoad(() => { $('#needle')[0].value = ''; $('#search-result').clear(); }); - let searchFromState = store('searchFormState') - if (searchFromState) { + let searchFormState = store('searchFormState') + if (searchFormState) { for (let id of ["countryFilter", "aga", "egf", "ffg"]) { - $(`#${id}`)[0].checked = searchFromState[id]; + let ctl = $(`#${id}`); + if (ctl.length) { + ctl[0].checked = searchFormState[id]; + } } } $('.toggle').on('click', e => { diff --git a/view-webapp/src/main/webapp/tour-registration.inc.html b/view-webapp/src/main/webapp/tour-registration.inc.html index 894c557..d51a42c 100644 --- a/view-webapp/src/main/webapp/tour-registration.inc.html +++ b/view-webapp/src/main/webapp/tour-registration.inc.html @@ -252,7 +252,7 @@