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