Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Purescript Gargantext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gargantext
Purescript Gargantext
Commits
b7ea8a8f
Commit
b7ea8a8f
authored
7 years ago
by
Abinaya Sudhir
Browse files
Options
Downloads
Patches
Plain Diff
moved the group editing above the terms table
parent
98f38260
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/NgramsTable.purs
+27
-23
27 additions, 23 deletions
src/NgramsTable.purs
with
27 additions
and
23 deletions
src/NgramsTable.purs
+
27
−
23
View file @
b7ea8a8f
...
...
@@ -217,7 +217,6 @@ tableSpec = over _render \render dispatch p (State s) c ->
]
]
, div [className "col-md-6", style {marginTop : "24px", marginBottom : "14px"}]
[ textDescription s.currentPage s.pageSize s.totalRecords
, pagination dispatch s.totalPages s.currentPage
...
...
@@ -226,26 +225,29 @@ tableSpec = over _render \render dispatch p (State s) c ->
]
]
, div [_id "terms_table", className "panel-body"]
[ table [ className "table able table-bordered"]
[ thead [ className "tableHeader table-bordered"]
[ tr []
[ th [ scope "col"] [ text "Map" ]
, th [ scope "col"] [ text "Stop"]
, th [ scope "col"] [ text "Terms"]
, th [ scope "col"] [ text "Occurences (nb)" ]
]
]
, tbody [] $ render dispatch p (State s) c
]
]
, div [] $ render dispatch p (State s) c
]
]
]
]
]
tableWrapperSpec :: forall eff props. Spec eff State props Action -> Spec eff State props Action
tableWrapperSpec = over _render \render dispatch p (State s) c ->
[ div [_id "terms_table", className "panel-body"]
[ table [ className "table able table-bordered"]
[ thead [ className "tableHeader table-bordered"]
[ tr []
[ th [ scope "col"] [ text "Map" ]
, th [ scope "col"] [ text "Stop"]
, th [ scope "col"] [ text "Terms"]
, th [ scope "col"] [ text "Occurences (nb)" ]
]
]
, tbody [] $ render dispatch p (State s) c
]
]
]
ngramsSpec :: forall props eff.
Spec
...
...
@@ -269,29 +271,31 @@ ngramsSpec = simpleSpec performAction render
, text " occurrences :"
, text $ show $ NI.termTotal t
, dispTermChildren t
, button [onClick $ d <<< (const DoneWithGroup) ] [text "Done"]
, button [onClick $ d <<< (const DoneWithGroup), className "btn btn-danger" ] [text "Cancel"]
, button [onClick $ d <<< (const DoneWithGroup), className "btn btn-info" ] [text "Done"]
]
]
dispTermChildren :: NI.Term -> ReactElement
dispTermChildren term = ul [] $ map childTerm (getter _.children term)
where
childTerm :: NI.Term -> ReactElement
childTerm child = li []
[ button [onClick $ d <<< (const (RemoveTerm child))] [text "Remove"]
[ span [className "note glyphicon glyphicon-minus-sign", onClick $ d <<< (const (RemoveTerm child)), style {marginLeft : "13px", marginRight : "13px"}] []
-- , button [onClick $ d <<< (const (RemoveTerm child))] [text "Remove"]
, NI.dispTerm (getter _.term child) (getter _._type child)
]
ngramsTableSpec :: forall props eff . Spec (console::CONSOLE, ajax::AJAX, dom::DOM | eff) State props Action
ngramsTableSpec = container $ fold
[ ngramsSpec
,tableSpec $ withState \st ->
focus _itemsList _ItemAction $
foreach \_ -> NI.ngramsItemSpec
[ tableSpec $ fold
[ ngramsSpec
, tableWrapperSpec $ withState \st ->
focus _itemsList _ItemAction $
foreach \_ -> NI.ngramsItemSpec
]
]
container :: forall eff state props action. Spec eff state props action -> Spec eff state props action
container = over _render \render d p s c ->
[ div [ className "container-fluid" ] $
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment