Due to how the event rows are inserted, the server side "desc" sort
becomes in effect an "asc" sort. To achieve a final sort of descending,
this patch makes the server-side sort ascending.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
var method = $('circ').checked ? 'FM_ATEV_APROPOS_CIRC' : 'FM_ATEV_APROPOS_AHR';
if (xul_param('copy_id')) { method += '_VIA_COPY'; }
- var filter = {"event":{"state":"complete"}, "order_by":[{"class":"atev", "field":"run_time", "direction":"desc"}]};
+ // Sort completed events "ascending". The grid inserts the rows
+ // bottom to top, so this results in a final sort of descending.
+ var filter = {"event":{"state":"complete"}, "order_by":[{"class":"atev", "field":"run_time", "direction":"asc"}]};
if ($('pending').checked) { filter.event.state = 'pending'; filter.order_by[0].direction = 'asc'; }
if ($('error').checked) { filter.event.state = 'error'; }