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
93fe68c6
Commit
93fe68c6
authored
Jan 18, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERGO] fix ngrams status edits
parent
70e54699
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Components.purs
src/Gargantext/Components/NgramsTable/Components.purs
+15
-10
No files found.
src/Gargantext/Components/NgramsTable/Components.purs
View file @
93fe68c6
...
@@ -111,7 +111,7 @@ renderNgramsTree p = R.createElement renderNgramsTreeCpt p []
...
@@ -111,7 +111,7 @@ renderNgramsTree p = R.createElement renderNgramsTreeCpt p []
renderNgramsTreeCpt :: R.Component RenderNgramsTree
renderNgramsTreeCpt :: R.Component RenderNgramsTree
renderNgramsTreeCpt = R.hooksComponentWithModule thisModule "renderNgramsTree" cpt
renderNgramsTreeCpt = R.hooksComponentWithModule thisModule "renderNgramsTree" cpt
where
where
cpt { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit
} _ =
cpt { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit} _ =
pure $ H.ul {} [
pure $ H.ul {} [
H.span { className: "tree" } [
H.span { className: "tree" } [
H.span { className: "righthanded" } [
H.span { className: "righthanded" } [
...
@@ -210,18 +210,23 @@ renderNgramsItemCpt = R.hooksComponentWithModule thisModule "renderNgramsItem" c
...
@@ -210,18 +210,23 @@ renderNgramsItemCpt = R.hooksComponentWithModule thisModule "renderNgramsItem" c
, selected
, selected
, checkbox T.MapTerm
, checkbox T.MapTerm
, checkbox T.StopTerm
, checkbox T.StopTerm
, H.div {} [
, H.div {} ( if ngramsParent == Nothing
if ngramsParent == Nothing
then [renderNgramsTree { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit }]
then renderNgramsTree { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit }
else [H.a { on: { click: const $ dispatch $ ToggleChild true ngrams } }
else
[ H.i { className: "glyphicon glyphicon-plus" } []]
H.a { on: { click: const $ dispatch $ ToggleChild true ngrams } } [
, R2.buff $ tag [ text $ " " <> ngramsTermText ngramsDepth.ngrams ]
H.i { className: "glyphicon glyphicon-plus" } []
]
, (R2.buff $ span ngramsStyle [text $ " " <> ngramsTermText ngrams])
)
]
]
, H.text $ show (ngramsElement ^. _NgramsElement <<< _occurrences)
, H.text $ show (ngramsElement ^. _NgramsElement <<< _occurrences)
]
]
where
where
ngramsDepth= {ngrams, depth: 0 }
tag =
case ngramsClick ngramsDepth of
Just effect ->
a (ngramsStyle <> [DOM.onClick $ const effect])
Nothing ->
span ngramsStyle
onClick _ = do
onClick _ = do
R2.callTrigger toggleSidePanel unit
R2.callTrigger toggleSidePanel unit
termList = ngramsElement ^. _NgramsElement <<< _list
termList = ngramsElement ^. _NgramsElement <<< _list
...
...
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