Remove isDynamic from modal.hamlet & minor cleanup
This commit is contained in:
parent
1dc322aeac
commit
f4ed279a15
@ -7,7 +7,6 @@ module Utils.Modal
|
|||||||
import ClassyPrelude.Yesod
|
import ClassyPrelude.Yesod
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Control.Lens.Extras (is)
|
|
||||||
import Utils.Route
|
import Utils.Route
|
||||||
|
|
||||||
import Settings (widgetFile)
|
import Settings (widgetFile)
|
||||||
@ -22,12 +21,11 @@ data Modal site = Modal
|
|||||||
|
|
||||||
customModal :: Modal site -> WidgetT site IO ()
|
customModal :: Modal site -> WidgetT site IO ()
|
||||||
customModal Modal{..} = do
|
customModal Modal{..} = do
|
||||||
let isDynamic = is _Left modalContent
|
|
||||||
triggerId' <- maybe newIdent return modalTriggerId
|
triggerId' <- maybe newIdent return modalTriggerId
|
||||||
|
|
||||||
$(widgetFile "widgets/modal/modal")
|
$(widgetFile "widgets/modal/modal")
|
||||||
|
|
||||||
route <- for (modalContent ^? _Left) toTextUrl
|
route <- traverse toTextUrl $ modalContent ^? _Left
|
||||||
modalTrigger route triggerId'
|
modalTrigger route triggerId'
|
||||||
|
|
||||||
-- | Create a link to a modal
|
-- | Create a link to a modal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
$newline never
|
$newline never
|
||||||
<div uw-modal data-modal-trigger=##{triggerId'} data-modal-closeable :isDynamic:.not-used>
|
<div uw-modal data-modal-trigger=##{triggerId'} data-modal-closeable>
|
||||||
$case modalContent
|
$case modalContent
|
||||||
$of Right content
|
$of Right content
|
||||||
<div .modal__content>
|
<div .modal__content>
|
||||||
|
|||||||
Reference in New Issue
Block a user