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
022837e6
Commit
022837e6
authored
May 26, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REFACT][Tree] regroup function back before split
parent
7341148b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+27
-20
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
022837e6
...
@@ -307,7 +307,10 @@ type NodePopupS =
...
@@ -307,7 +307,10 @@ type NodePopupS =
, nodeType :: GT.NodeType
, nodeType :: GT.NodeType
)
)
iconAStyle :: { color :: String, paddingTop :: String, paddingBottom :: String}
iconAStyle :: { color :: String
, paddingTop :: String
, paddingBottom :: String
}
iconAStyle = { color : "black"
iconAStyle = { color : "black"
, paddingTop : "6px"
, paddingTop : "6px"
, paddingBottom : "6px"
, paddingBottom : "6px"
...
@@ -505,6 +508,7 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
...
@@ -505,6 +508,7 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
where
where
cpt {action: Documentation nodeType} _ = actionDoc nodeType
cpt {action: Documentation nodeType} _ = actionDoc nodeType
cpt {action: Download, id, nodeType, session} _ = actionDownload nodeType id session
cpt {action: Download, id, nodeType, session} _ = actionDownload nodeType id session
cpt {action: Upload, dispatch, id, nodeType: GT.NodeList, session} _ = do
cpt {action: Upload, dispatch, id, nodeType: GT.NodeList, session} _ = do
pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session}
pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session}
...
@@ -517,6 +521,15 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
...
@@ -517,6 +521,15 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
[ H.text $ "Search and create a private corpus with the search query as corpus name." ]
[ H.text $ "Search and create a private corpus with the search query as corpus name." ]
, searchBar {langs: allLangs, onSearch: searchOn props, search, session}
, searchBar {langs: allLangs, onSearch: searchOn props, search, session}
]
]
where
searchOn :: Record PanelActionProps -> GT.AsyncTaskWithType -> Effect Unit
searchOn {dispatch, nodePopup: p} task = do
_ <- launchAff $ dispatch (SearchQuery task)
-- close popup
-- TODO
--snd p $ const Nothing
pure unit
cpt {action: Delete, nodeType: GT.NodeUser} _ = do
cpt {action: Delete, nodeType: GT.NodeUser} _ = do
pure $ R.fragment [
pure $ R.fragment [
...
@@ -528,6 +541,19 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
...
@@ -528,6 +541,19 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
H.div {style: {margin: "10px"}} (map (\t -> H.p {} [H.text t]) ["Are your sure you want to delete it ?", "If yes, click again below."])
H.div {style: {margin: "10px"}} (map (\t -> H.p {} [H.text t]) ["Are your sure you want to delete it ?", "If yes, click again below."])
, reallyDelete dispatch
, reallyDelete dispatch
]
]
where
reallyDelete :: Dispatch -> R.Element
reallyDelete d = H.div {className: "panel-footer"}
[ H.a { type: "button"
, className: "btn glyphicon glyphicon-trash"
, id: "delete"
, title: "Delete"
, on: {click: \_ -> launchAff $ d $ DeleteNode}
}
[H.text " Yes, delete!"]
]
cpt {action: Add xs, dispatch, id, name, nodePopup: p, nodeType} _ = do
cpt {action: Add xs, dispatch, id, name, nodePopup: p, nodeType} _ = do
pure $ createNodeView {dispatch, id, name, nodeType, nodeTypes: xs}
pure $ createNodeView {dispatch, id, name, nodeType, nodeTypes: xs}
...
@@ -556,25 +582,6 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
...
@@ -556,25 +582,6 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
pure $ H.div {} []
pure $ H.div {} []
searchOn :: Record PanelActionProps -> GT.AsyncTaskWithType -> Effect Unit
searchOn {dispatch, nodePopup: p} task = do
_ <- launchAff $ dispatch (SearchQuery task)
-- close popup
-- TODO
--snd p $ const Nothing
pure unit
reallyDelete :: Dispatch -> R.Element
reallyDelete d = H.div {className: "panel-footer"}
[ H.a { type: "button"
, className: "btn glyphicon glyphicon-trash"
, id: "delete"
, title: "Delete"
, on: {click: \_ -> launchAff $ d $ DeleteNode}
}
[H.text " Yes, delete!"]
]
...
...
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