From 9d65f94f518e518a2a501db6a00079cc2f6553db Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 13 Apr 2018 15:28:04 +0200 Subject: [PATCH] Mark sortable columns --- src/Handler/Utils/Table/Pagination.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index 997a4aa6b..7ddc207eb 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -161,10 +161,9 @@ dbTable PSValidator{..} DBTable{ dbtIdent = (toPathPiece -> dbtIdent), .. } = do } where directions = [dir | (k, dir) <- psSorting, Just k == sortableKey ] - sortableAttr = foldMap toAttr directions + sortableAttr = foldMap toAttr directions <> Html5.class_ "sortable" toAttr SortAsc = Html5.class_ "sorted-asc" toAttr SortDesc = Html5.class_ "sorted-desc" - -- TODO: add class "sortable" if column is sortable $(widgetFile "table/layout") where tblLayout :: Widget -> Handler Html