MSIN-4456 — Enhance sorting functionality for team names in bib assignments. Introduce new functions to ensure reliable ordering by team name and implement PHP-based sorting for participants when the primary sort criterion is a team. Update AJAX responses to include additional sorting parameters. Increment version code to 4.72.833.
This commit is contained in:
@ -205,11 +205,16 @@
|
||||
if (!row) {
|
||||
return { sort1: '', sort2: '' };
|
||||
}
|
||||
var s1 = row.querySelector('.batch-order');
|
||||
var s2 = row.querySelector('.batch-order-2');
|
||||
// MSIN-4456 — Lire explicitement primaire vs secondaire (évite toute ambiguïté de sélecteur).
|
||||
var wrap1 = row.querySelector('.epr-batch-order-wrap:not(.epr-batch-order-wrap--secondary)');
|
||||
var wrap2 = row.querySelector('.epr-batch-order-wrap--secondary');
|
||||
var s1 = (wrap1 && wrap1.querySelector('select.batch-order'))
|
||||
|| row.querySelector('select.batch-order');
|
||||
var s2 = (wrap2 && wrap2.querySelector('select.batch-order-2'))
|
||||
|| row.querySelector('select.batch-order-2');
|
||||
return {
|
||||
sort1: s1 ? s1.value : '',
|
||||
sort2: s2 ? s2.value : ''
|
||||
sort1: s1 ? String(s1.value || '').trim() : '',
|
||||
sort2: s2 ? String(s2.value || '').trim() : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user