diff --git a/app/Resources/views/Banlists/banlists.html.twig b/app/Resources/views/Banlists/banlists.html.twig index e9c9dcb6..7e3ff4cb 100644 --- a/app/Resources/views/Banlists/banlists.html.twig +++ b/app/Resources/views/Banlists/banlists.html.twig @@ -23,16 +23,16 @@
@@ -80,6 +80,9 @@ async function buildBanlistsView() { // Remove the loading indicator $('.temp-loading').remove(); + const query_format = {% if format %}'{{ format | e('js') }}'{% else %}null{% endif %}; + const query_restriction = {% if restriction %}'{{ restriction | e('js') }}'{% else %}null{% endif %}; + // Add each format to the page formats.forEach(f => { const jqPane = $(`#tab-pane-${f.id}`); @@ -144,6 +147,11 @@ async function buildBanlistsView() { Object.keys(runnerUFC).sort().reverse().forEach(p => { jqRunner.append(generateList(`+${p} Universal Influence`, runnerUFC[p])); }); if (runnerPen.length > 0) { jqRunner.append(generateList('Identity Influence Reduction', runnerPen)); } Object.keys(runnerPts).sort().reverse().forEach(p => { jqRunner.append(generateList(`${p} ${p == 1 ? 'Point' : 'Points'}`, runnerPts[p])); }); + + // Fill in searchbox specific format/restriction pair passed in. + if (f.id == query_format && query_restriction) { + jqPane.find('.panel-search input').val(query_restriction).keyup(); + } }); } }); diff --git a/app/Resources/views/Formats/formats.html.twig b/app/Resources/views/Formats/formats.html.twig index 9f1e71fd..99aeb935 100644 --- a/app/Resources/views/Formats/formats.html.twig +++ b/app/Resources/views/Formats/formats.html.twig @@ -76,7 +76,7 @@ async function buildFormatsView() { $(`#${format.id}`).append(`${r.attributes.name}
active as of ${r.attributes.date_start}
${r.attributes.name}
active as of ${r.attributes.date_start}
None