1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-24 13:26:08 +03:00

Make the “edit ecosystem” icon a toggle

This commit is contained in:
Artyom 2016-04-22 16:22:46 +03:00
parent 7f8275b248
commit d7e4334d2e

View File

@ -799,17 +799,22 @@ renderItemEcosystem item = do
let thisId = "item-ecosystem-" <> uidToText (item^.uid)
this = JS.selectId thisId
div_ [id_ thisId, class_ "item-ecosystem"] $ do
strong_ "Ecosystem"
emptySpan "0.5em"
imgButton "edit ecosystem" "/pencil.svg"
[style_ "width:12px;opacity:0.5"] $
JS.switchSection (this, "editing" :: Text)
section "normal" [shown, noScriptShown] $ do
strong_ "Ecosystem"
emptySpan "0.5em"
imgButton "edit ecosystem" "/pencil.svg"
[style_ "width:12px;opacity:0.5"] $
JS.switchSection (this, "editing" :: Text)
unless (markdownNull (item^.ecosystem)) $
toHtml (item^.ecosystem)
section "editing" [] $
section "editing" [] $ do
strong_ "Ecosystem"
emptySpan "0.5em"
imgButton "undo editing ecosystem" "/pencil.svg"
[style_ "width:12px;opacity:0.5"] $
JS.switchSection (this, "normal" :: Text)
markdownEditor
[rows_ "3"]
(item^.ecosystem)