Commit 02b6488b authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[css] some left/right handed view refactoring

parent 18918092
......@@ -78,6 +78,9 @@ li#rename #rename-a {
background-color: white;
border: none;
}
#node-popup-tooltip .popup-container .panel .panel-body .spacer {
margin: 10px;
}
#node-popup-tooltip .popup-container .frame-search.panel {
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
......
......@@ -70,6 +70,8 @@ li#rename
justify-content: center
background-color: white
border: none
.spacer
margin: 10px
.frame-search.panel
border: 1px solid rgba(0,0,0,0.2)
box-shadow: 0 2px 5px rgba(0,0,0,0.2)
......
......@@ -4,6 +4,9 @@ module Gargantext.Components.Forest.Tree.Node.Action.Move
import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTreeParamsIn)
......@@ -11,8 +14,6 @@ import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, put_)
import Gargantext.Types as GT
import Reactix as R
import Reactix.DOM.HTML as H
moveNodeReq :: Session -> GT.ID -> GT.ID -> Aff (Array GT.ID)
moveNodeReq session fromId toId =
......@@ -35,10 +36,10 @@ moveNodeCpt = R.hooksComponent "G.C.F.T.N.A.M.moveNode" cpt
pure $ panel [ subTreeView { action
, dispatch
, handed
, id
, nodeType
, session
, subTreeParams
, handed
}
] button
......@@ -36,9 +36,7 @@ panel bodies submit =
where
panelBody bs =
H.div {className: "panel-body"}
[ H.div { className: "row"
, style: {"margin":"10px"}
}
[ H.div { className: "row spacer" }
[ H.div { className: "col-md-12" } bs
-- TODO add type for text or form here
-- [ H.form {className: "form-horizontal"} bs ]
......
......@@ -5,6 +5,9 @@ import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Effect.Uncurried (mkEffectFn1)
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Components.Forest.Tree.Node.Action (Props, Action, subTreeOut, setTreeOut)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeParams(..), SubTreeOut(..))
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..))
......@@ -14,8 +17,6 @@ import Gargantext.Prelude (map, pure, show, ($), (&&), (/=), (<>), const, (==),
import Gargantext.Routes as GR
import Gargantext.Sessions (Session(..), get)
import Gargantext.Types as GT
import Reactix as R
import Reactix.DOM.HTML as H
type SubTreeParamsIn =
( subTreeParams :: SubTreeParams
......@@ -33,15 +34,15 @@ subTreeView :: Record SubTreeParamsProps -> R.Element
subTreeView props = R.createElement subTreeViewCpt props []
subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeView" cpt
subTreeViewCpt = R.hooksComponent "G.C.F.T.N.T.ST.subTreeView" cpt
where
cpt params@{ dispatch
cpt params@{ action
, dispatch
, handed
, id
, nodeType
, session
, subTreeParams
, action
, handed
} _ =
do
let
......@@ -51,14 +52,14 @@ subTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeView" cpt
useLoader session (loadSubTree showtypes) $
\tree ->
subTreeViewLoaded { dispatch
subTreeViewLoaded { action
, dispatch
, handed
, id
, nodeType
, session
, tree
, subTreeParams
, action
, handed
, tree
}
loadSubTree :: Array GT.NodeType -> Session -> Aff FTree
......@@ -81,7 +82,7 @@ subTreeViewLoaded :: Record CorpusTreeProps -> R.Element
subTreeViewLoaded props = R.createElement subTreeViewLoadedCpt props []
subTreeViewLoadedCpt :: R.Component CorpusTreeProps
subTreeViewLoadedCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeViewLoadedCpt" cpt
subTreeViewLoadedCpt = R.hooksComponent "G.C.F.T.N.T.ST.subTreeViewLoadedCpt" cpt
where
cpt p@{dispatch, id, nodeType, session, tree, handed} _ = do
pure $ H.div {className:"tree"}
......@@ -96,7 +97,7 @@ subTreeTreeView :: Record CorpusTreeProps -> R.Element
subTreeTreeView props = R.createElement subTreeTreeViewCpt props []
subTreeTreeViewCpt :: R.Component CorpusTreeProps
subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeTreeViewCpt" cpt
subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.T.ST.subTreeTreeViewCpt" cpt
where
cpt p@{ id
, tree: NTree (LNode { id: targetId
......
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