aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/Payments/Paging.elm
diff options
context:
space:
mode:
authorJoris2015-09-06 16:23:48 +0200
committerJoris2015-09-06 16:23:48 +0200
commit0b6f0fa29075178b45cb17d2932003ab4b342280 (patch)
tree8fcdf55131683978b5593a07078d8002df4540d9 /src/client/View/Payments/Paging.elm
parent0ae7d068263dffbc1cc2dc92c7829dd0037c97e7 (diff)
downloadbudget-0b6f0fa29075178b45cb17d2932003ab4b342280.tar.gz
budget-0b6f0fa29075178b45cb17d2932003ab4b342280.tar.bz2
budget-0b6f0fa29075178b45cb17d2932003ab4b342280.zip
Use buttons or links when elements are clickable
Diffstat (limited to 'src/client/View/Payments/Paging.elm')
-rw-r--r--src/client/View/Payments/Paging.elm12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/View/Payments/Paging.elm b/src/client/View/Payments/Paging.elm
index 53df3b3..b9a0109 100644
--- a/src/client/View/Payments/Paging.elm
+++ b/src/client/View/Payments/Paging.elm
@@ -27,7 +27,7 @@ paymentsPaging loggedView =
then
text ""
else
- ul
+ div
[ class "pages" ]
( ( if loggedView.currentPage > 1
then [ firstPage, previousPage loggedView ]
@@ -56,7 +56,7 @@ truncatePages currentPage pages =
firstPage : Html
firstPage =
- li
+ button
[ class "page"
, onClick serverCommunications.address (SC.UpdatePage 1)
]
@@ -64,7 +64,7 @@ firstPage =
previousPage : LoggedView -> Html
previousPage loggedView =
- li
+ button
[ class "page"
, onClick serverCommunications.address (SC.UpdatePage (loggedView.currentPage - 1))
]
@@ -72,7 +72,7 @@ previousPage loggedView =
nextPage : LoggedView -> Html
nextPage loggedView =
- li
+ button
[ class "page"
, onClick serverCommunications.address (SC.UpdatePage (loggedView.currentPage + 1))
]
@@ -80,7 +80,7 @@ nextPage loggedView =
lastPage : Int -> Html
lastPage maxPage =
- li
+ button
[ class "page"
, onClick serverCommunications.address (SC.UpdatePage maxPage)
]
@@ -89,7 +89,7 @@ lastPage maxPage =
paymentsPage : LoggedView -> Int -> Html
paymentsPage loggedView page =
let onCurrentPage = page == loggedView.currentPage
- in li
+ in button
[ class ("page" ++ (if onCurrentPage then " current" else ""))
, onClick serverCommunications.address <|
if onCurrentPage then SC.NoCommunication else SC.UpdatePage page