m2s listLink select class

This commit is contained in:
ostertun
2021-04-19 12:19:34 +02:00
parent 1e0052f629
commit 84677ef4dd
2 changed files with 6 additions and 6 deletions

View File

@@ -664,24 +664,24 @@ var addConsoleOpenerToPreloader = function() {
} }
addConsoleOpenerToPreloader(); addConsoleOpenerToPreloader();
function m2s_getLink(type, eventId) { function m2s_getLink(type, eventId, classId) {
switch (type) { switch (type) {
case 'entrylist': case 'entrylist':
return 'https://manage2sail.com/de-DE/event/' + eventId + '#!/entries'; return 'https://manage2sail.com/de-DE/event/' + eventId + '#!/entries?classId=' + classId;
} }
return ''; return '';
} }
function ro_getLink(type, eventId) { function ro_getLink(type, eventId, classId) {
switch (type) { switch (type) {
case 'entrylist': case 'entrylist':
return 'http://www.raceoffice.org/entrylist.php?eid=' + eventId; return 'http://www.raceoffice.org/entrylist.php?eid=' + eventId;
} }
return ''; return '';
} }
function extServiceGetLink(serviceName, type, eventId = '') { function extServiceGetLink(serviceName, type, eventId = '', classId = '') {
switch (serviceName) { switch (serviceName) {
case 'm2s': case 'm2s':
return m2s_getLink(type, eventId); return m2s_getLink(type, eventId, classId);
case 'ro': case 'ro':
return ro_getLink(type, eventId); return ro_getLink(type, eventId);
} }

View File

@@ -107,7 +107,7 @@ async function onRegattaClicked(id) {
} }
if ((regatta.extService !== null) && ('entryCount' in extServiceData)) { if ((regatta.extService !== null) && ('entryCount' in extServiceData)) {
$('#badge-regatta-entrylist').text(extServiceData.entryCount); $('#badge-regatta-entrylist').text(extServiceData.entryCount);
$('#menu-item-entrylist').attr('href', extServiceGetLink(regatta.extService, 'entrylist', extServiceData.eventId)); // TODO $('#menu-item-entrylist').attr('href', extServiceGetLink(regatta.extService, 'entrylist', extServiceData.eventId, extServiceData.classId)); // TODO
$('#menu-item-entrylist').show(); $('#menu-item-entrylist').show();
} else { } else {
$('#menu-item-entrylist').hide(); $('#menu-item-entrylist').hide();