From 45d8f0df1a1454fbbdffce6f9cf6be9125390187 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 23 Aug 2019 13:25:21 -0700 Subject: [PATCH] For orderby=random, don't add -asc -desc to the URL. --- frontends/etiquette_flask/templates/search.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontends/etiquette_flask/templates/search.html b/frontends/etiquette_flask/templates/search.html index ad73102..dda78b0 100644 --- a/frontends/etiquette_flask/templates/search.html +++ b/frontends/etiquette_flask/templates/search.html @@ -521,8 +521,15 @@ function submit_search() { var row = orderby_rows[index]; var column = row.children[0].value; - var sorter = row.children[1].value; - orderby_params.push(column + "-" + sorter); + if (column == "random") + { + orderby_params.push(column); + } + else + { + var sorter = row.children[1].value; + orderby_params.push(column + "-" + sorter); + } } orderby_params = orderby_params.join(","); if (orderby_params && orderby_params != "created-desc")