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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
a2eb4c9b
Commit
a2eb4c9b
authored
Jun 26, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NgramsTree] bootstrap colors for annotations
parent
f32774ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
AnnotatedField.purs
src/Gargantext/Components/Annotation/AnnotatedField.purs
+2
-2
Menu.purs
src/Gargantext/Components/Annotation/Menu.purs
+2
-2
Utils.purs
src/Gargantext/Components/Annotation/Utils.purs
+5
-0
No files found.
src/Gargantext/Components/Annotation/AnnotatedField.purs
View file @
a2eb4c9b
...
...
@@ -26,7 +26,7 @@ import Reactix.DOM.HTML as HTML
import Reactix.SyntheticEvent as E
import Gargantext.Types ( TermList )
import Gargantext.Components.Annotation.Utils ( termClass )
import Gargantext.Components.Annotation.Utils ( term
Bootstrap
Class )
import Gargantext.Components.NgramsTable.Core ( NgramsTerm, NgramsTable(..), _NgramsElement, _list, highlightNgrams )
import Gargantext.Components.Annotation.Menu ( AnnotationMenu, annotationMenu, MenuType(..) )
import Gargantext.Utils.Selection as Sel
...
...
@@ -122,6 +122,6 @@ annotatedRunComponent = R.staticComponent "AnnotatedRun" cpt
HTML.span { className: className list
, onClick: mkEffectFn1 $ \e -> onSelect text (Just list) e} [ HTML.text text ]
where
className list = "annotation-run
" <> term
Class list
className list = "annotation-run
bg-" <> termBootstrap
Class list
src/Gargantext/Components/Annotation/Menu.purs
View file @
a2eb4c9b
...
...
@@ -12,7 +12,7 @@ import Reactix.DOM.HTML as HTML
import Reactix.SyntheticEvent as E
import Gargantext.Types ( TermList(..), termListName )
import Gargantext.Components.Annotation.Utils ( termClass )
import Gargantext.Components.Annotation.Utils ( term
Bootstrap
Class )
import Gargantext.Components.ContextMenu.ContextMenu as CM
import Gargantext.Utils.Selection (Selection, selectionToString)
...
...
@@ -50,5 +50,5 @@ addToList {menuType, setList} t = Just $ CM.contextMenuItem [ link ]
link = HTML.a { onClick: click, className: className } [ HTML.text (label menuType) ]
label NewNgram = "Add to " <> termListName t
label SetTermListItem = "Change to" <> termListName t
className = "list-group-item
" <> (term
Class t)
className = "list-group-item
list-group-item-" <> (termBootstrap
Class t)
click = mkEffectFn1 $ \_ -> setList t
src/Gargantext/Components/Annotation/Utils.purs
View file @
a2eb4c9b
...
...
@@ -6,3 +6,8 @@ termClass :: TermList -> String
termClass GraphTerm = "graph-term"
termClass StopTerm = "stop-term"
termClass CandidateTerm = "candidate-term"
termBootstrapClass :: TermList -> String
termBootstrapClass GraphTerm = "success"
termBootstrapClass StopTerm = "danger"
termBootstrapClass CandidateTerm = "info"
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