diff options
Diffstat (limited to 'src/client/elm/View')
-rw-r--r-- | src/client/elm/View/Events.elm | 2 | ||||
-rw-r--r-- | src/client/elm/View/LoggedIn/Paging.elm | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/client/elm/View/Events.elm b/src/client/elm/View/Events.elm index 1eb9027..c9dff9f 100644 --- a/src/client/elm/View/Events.elm +++ b/src/client/elm/View/Events.elm @@ -12,7 +12,7 @@ onSubmitPrevDefault : Signal.Address a -> a -> Attribute onSubmitPrevDefault address value = onWithOptions "submit" - { defaultOptions | preventDefault <- True } + { defaultOptions | preventDefault = True } Json.value (\_ -> Signal.message address value diff --git a/src/client/elm/View/LoggedIn/Paging.elm b/src/client/elm/View/LoggedIn/Paging.elm index 93d7f1d..608113b 100644 --- a/src/client/elm/View/LoggedIn/Paging.elm +++ b/src/client/elm/View/LoggedIn/Paging.elm @@ -46,12 +46,12 @@ truncatePages currentPage pages = showedLeftPages = ceiling ((toFloat showedPages - 1) / 2) showedRightPages = floor ((toFloat showedPages - 1) / 2) truncatedPages = - if | currentPage < showedLeftPages -> - [1..showedPages] - | currentPage > totalPages - showedRightPages -> - [(totalPages - showedPages)..totalPages] - | otherwise -> - [(currentPage - showedLeftPages)..(currentPage + showedRightPages)] + if currentPage < showedLeftPages then + [1..showedPages] + else if currentPage > totalPages - showedRightPages then + [(totalPages - showedPages)..totalPages] + else + [(currentPage - showedLeftPages)..(currentPage + showedRightPages)] in List.filter (flip List.member pages) truncatedPages firstPage : Html |