← All manuals IM2

table_sorting

Technical Spec

Table sorting (shared) — Ver 1, 2026-09-07

Where: templates/base.html, one IIFE at the bottom of the page plus the th.sortable CSS. No per-screen JavaScript.

Opting in: <table class="sorttable">. On DOMContentLoaded every thead th is made sortable and given an ▲▼ arrow, except:

Behaviour

Screens using it: RO Issues summary and detail list, RO Inbox, RO Import History, Pick Review (open + posted lists), PO Workbench, Buy List, Saved Buy Lists, PO Alerts, PO Release Report, PO SKU detail, Count List, Users.

Not converted: ro_inquiry.html and ro_order.html sorted before this change and keep their own inline implementation (their tables deliberately exclude several columns and the RO detail expand row is handled by that screen's own script). If they are ever touched again, move them onto sorttable and delete the duplicate JS.