Commit 3feee565 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DESIGN] Forest Tree Box

parent 72bb7463
...@@ -477,7 +477,9 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt ...@@ -477,7 +477,9 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
-> R.Element -> R.Element
panelBody nodePopupState {dispatch: d, nodeType} = panelBody nodePopupState {dispatch: d, nodeType} =
H.div {className: "panel-body flex-space-between"} H.div {className: "panel-body flex-space-between"}
[ H.div {className: "flex-center"} [buttonClick {action: doc, state: nodePopupState}] [ H.p { "style": {"margin":"10px"}} []
, H.div { className: "flex-center"}
[buttonClick {action: doc, state: nodePopupState}]
, H.div {className: "flex-center"} , H.div {className: "flex-center"}
$ map (\t -> buttonClick {action: t, state: nodePopupState}) buttons $ map (\t -> buttonClick {action: t, state: nodePopupState}) buttons
] ]
...@@ -520,17 +522,17 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt ...@@ -520,17 +522,17 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt
where where
cpt {action: todo, state: (node@{action} /\ setNodePopup)} _ = do cpt {action: todo, state: (node@{action} /\ setNodePopup)} _ = do
pure $ H.div {className: "col-md-1"} pure $ H.div {className: "col-md-1"}
[ H.a { style: iconAStyle [ H.a { style: iconAStyle
, className: glyphiconActive (glyphiconNodeAction todo) , className: glyphiconActive (glyphiconNodeAction todo)
(action == (Just todo) ) (action == (Just todo) )
, id: show todo , id: show todo
, title: show todo , title: show todo
, onClick : mkEffectFn1 , onClick : mkEffectFn1
$ \_ -> setNodePopup $ \_ -> setNodePopup
$ const (node { action = action' }) $ const (node { action = action' })
} }
[] []
] ]
where where
action' = if action == (Just todo) action' = if action == (Just todo)
then Nothing then Nothing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment