add modalDynamic to modalStatic

This commit is contained in:
Felix Hamann 2018-10-02 21:18:19 +02:00
parent 722f3c80b5
commit b9ba2167aa
4 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ colDescription = sortable Nothing (i18nCell MsgCourseDescription)
$ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _, _) } ->
case courseDescription of
Nothing -> mempty
(Just descr) -> cell $ modalStatic "Beschreibung" descr
(Just descr) -> cell $ modalStatic "Beschreibung" descr False
colCShort :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort)
@ -73,7 +73,7 @@ colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort)
( case courseDescription of
Nothing -> mempty
(Just descr) -> cell
[whamlet|<span style="float:right"> ^{modalStatic "Beschreibung" descr} |]
[whamlet|<span style="float:right"> ^{modalStatic "Beschreibung" descr False} |]
)
colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)

View File

@ -76,7 +76,7 @@ courseCell (Course {..}) = anchorCell link name `mappend` desc
name = citext2widget courseName
desc = case courseDescription of
Nothing -> mempty
(Just descr) -> cell [whamlet| <span style="float:right"> ^{modalStatic "Beschreibung" descr} |]
(Just descr) -> cell [whamlet| <span style="float:right"> ^{modalStatic "Beschreibung" descr False} |]
sheetCell :: IsDBTable m a => CourseLink -> SheetName -> DBCell m a
sheetCell crse shn =

View File

@ -7,8 +7,8 @@ import Import.NoFoundation
lipsum :: WidgetT site IO ()
lipsum = $(widgetFile "widgets/lipsum")
modalStatic :: Html -> Html -> WidgetT site IO ()
modalStatic modalTrigger modalContent = do
modalStatic :: Html -> Html -> Bool -> WidgetT site IO ()
modalStatic modalTrigger modalContent modalDynamic = do
modalId <- newIdent
triggerId <- newIdent
$(widgetFile "widgets/modalStatic")

View File

@ -1,2 +1,2 @@
<div .modal.js-modal #modal-#{modalId} data-trigger=#{triggerId} data-closeable=true>
<div .modal.js-modal #modal-#{modalId} data-trigger=#{triggerId} data-closeable=true data-dynamic=#{modalDynamic}>
#{modalContent}