Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
6dc93d93
Commit
6dc93d93
authored
Jun 15, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DESIGN] increasing box if not many actions
parent
ab4c05a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+1
-1
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+18
-13
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
6dc93d93
...
@@ -72,7 +72,7 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
...
@@ -72,7 +72,7 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
-> R.Element
-> R.Element
panelBody (_ /\ setNodeName) (nt /\ setNodeType) =
panelBody (_ /\ setNodeName) (nt /\ setNodeType) =
H.div {className: "panel-body"}
H.div {className: "panel-body"}
[ H.div {className: "row"}
[ H.div {className: "row"
, style: {"margin":"10px"}
}
[ H.div {className: "col-md-10"}
[ H.div {className: "col-md-10"}
[ H.form {className: "form-horizontal"} $ maybeChoose <> maybeEdit ]
[ H.form {className: "form-horizontal"} $ maybeChoose <> maybeEdit ]
]
]
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
6dc93d93
module Gargantext.Components.Forest.Tree.Node.Box where
module Gargantext.Components.Forest.Tree.Node.Box where
import Data.Array (length)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Nullable (null)
import Data.Nullable (null)
import Data.String as S
import Data.String as S
...
@@ -22,7 +23,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
...
@@ -22,7 +23,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT)
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT)
import Gargantext.Prelude (Unit, bind, const, map, pure, show, ($), (<>), (==))
import Gargantext.Prelude (Unit, bind, const, map, pure, show, ($), (<>), (==)
, (<)
)
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
import Gargantext.Types (Name, ID)
import Gargantext.Types (Name, ID)
import Gargantext.Types as GT
import Gargantext.Types as GT
...
@@ -138,18 +139,22 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
...
@@ -138,18 +139,22 @@ 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.p { "style": {"margin":"10px"}} []
$ [ H.p { "style": {"margin":"10px"}} []
, H.div { className: "flex-center"}
, H.div { className: "flex-center"}
[ buttonClick { action: doc
[ buttonClick { action: doc
, state: nodePopupState
, state: nodePopupState
}
}
]
]
, H.div {className: "flex-center"}
, H.div {className: "flex-center"}
$ map (\t -> buttonClick { action: t
$ map (\t -> buttonClick { action: t
, state : nodePopupState
, state : nodePopupState
}
}
) buttons
) buttons
]
]
-- FIXME trick to increase the size of the box
<> if length buttons < 2
then [H.div {className: "col-md-4"} []]
else []
where
where
SettingsBox {edit, doc, buttons} = settingsBox nodeType
SettingsBox {edit, doc, buttons} = settingsBox nodeType
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment