Commit 28929fe4 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[CLEAN] FIXME: subtree needs a shape

parent cfae041b
......@@ -10,14 +10,7 @@
&.disabled
cursor: wait
.node
padding-left: 10px
margin-top: 1px
.name
&.clickable
color: #337ab7
cursor: pointer
&:hover
text-decoration: underline
.lefthanded
ul
margin-right : 19px
......
......@@ -37,8 +37,7 @@ mergeNodeCpt = R.hooksComponent "G.C.F.T.N.A.M.mergeNode" cpt
Nothing -> H.div {} []
_ -> H.div {} []
pure $ panel [
subTreeView { action
pure $ panel [ subTreeView { action
, dispatch
, id
, nodeType
......@@ -46,13 +45,13 @@ mergeNodeCpt = R.hooksComponent "G.C.F.T.N.A.M.mergeNode" cpt
, subTreeParams
, handed
}
, H.div { className:"panel panel-primary"}
[ H.text "Merge which list?"
, checkboxes [GT.MapTerm, GT.CandidateTerm, GT.StopTerm] options
]
, H.div { className:"panel panel-primary"}
[ H.text "Title"
, H.div {className: "checkbox"}
[checkbox merge, H.text "Merge data?"]
]
] button
, H.div { className:"panel panel-primary"}
[ H.text "Merge which list?"
, checkboxes [GT.MapTerm, GT.CandidateTerm, GT.StopTerm] options
]
, H.div { className:"panel panel-primary"}
[ H.text "Title"
, H.div {className: "checkbox"}
[checkbox merge, H.text "Merge data?"]
]
] button
......@@ -83,12 +83,13 @@ subTreeViewLoaded props = R.createElement subTreeViewLoadedCpt props []
subTreeViewLoadedCpt :: R.Component CorpusTreeProps
subTreeViewLoadedCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeViewLoadedCpt" cpt
where
cpt p@{dispatch, id, nodeType, session, tree} _ = do
pure $ H.div {className:"panel panel-primary"}
[H.div { className: "tree" }
[ H.div { className: "" }
[ subTreeTreeView p ]
]
cpt p@{dispatch, id, nodeType, session, tree, handed} _ = do
pure $ H.div {className:"tree"}
[H.div { className: if handed == GT.RightHanded
then "righthanded"
else "lefthanded"
}
[ subTreeTreeView p ]
]
subTreeTreeView :: Record CorpusTreeProps -> R.Element
......@@ -113,13 +114,14 @@ subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeTreeViewCpt" cpt
GT.LeftHanded -> A.reverse
GT.RightHanded -> identity
pure $ H.div { className: if handed == GT.RightHanded
then "righthanded"
else "lefthanded"
} $ (ordering [ H.div { className: "node " <> GT.fldr nodeType true} []
, H.span { style : if validNodeType
then { color : "blue", "text-decoration": "underline"}
else { color : "" , "text-decoration": "none"}
pure $ H.div {} $ (ordering [ H.div { className: "node " <> GT.fldr nodeType true} []
, H.span { style : if validNodeType
then { color : "blue"
, "text-decoration": "underline"
}
else { color : ""
, "text-decoration": "none"
}
, on: { click: onClick }
}
[ nodeText { isSelected: isSelected targetId valAction
......@@ -133,7 +135,7 @@ subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeTreeViewCpt" cpt
where
SubTreeParams { valitypes } = subTreeParams
sortedAry = A.sortWith (\(NTree (LNode {id:id'}) _) -> id')
$ A.filter (\(NTree (LNode {id:id'}) _) -> id'/= id) ary
......
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