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
2a9c6329
Commit
2a9c6329
authored
Nov 30, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/graph-explorer-ui' into masterMerge
parents
4fed7755
b032dd7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
Tree.purs
src/Gargantext/Components/Tree.purs
+2
-2
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+24
-3
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+1
-1
No files found.
src/Gargantext/Components/Tree.purs
View file @
2a9c6329
...
...
@@ -359,7 +359,7 @@ toHtml d s@(NTree (LNode {id, name, nodeType, open, popOver, renameNodeValue, cr
li [] $
[
a [onClick $ (\e-> d $ ToggleFolder id)] [i [fldr open] []]
,
a [ href (toUrl Front nodeType (Just id)), style {position:"absolute",left:"44px"}]
,
a [ href (toUrl Front nodeType (Just id)), style {position:"absolute",left:"44px"}]
( [ text (name <> " ")
]
)
...
...
@@ -376,7 +376,7 @@ toHtml d s@(NTree (LNode {id, name, nodeType, open, popOver, renameNodeValue,cre
ul []
[ li [] $
( [ a [onClick $ (\e-> d $ ToggleFolder id)] [i [fldr open] []]
,
a [ href (toUrl Front nodeType (Just id)), style {position:"absolute",left:"44px"}]
,
a [ href (toUrl Front nodeType (Just id)), style {position:"absolute",left:"44px"}]
[ text $ " " <> name <> " " ]
, a [className "glyphicon glyphicon-cog", _id "rename",onClick $ (\_-> d $ (ShowPopOver id))]
[
...
...
src/Gargantext/Pages/Corpus/Graph.purs
View file @
2a9c6329
...
...
@@ -34,6 +34,7 @@ data Action
= LoadGraph Int
| SelectNode SelectedNode
| ShowSidePanel
| ShowControls
newtype SelectedNode = SelectedNode {id :: String, label :: String}
...
...
@@ -47,6 +48,7 @@ newtype State = State
, legendData :: Array Legend
, selectedNode :: Maybe SelectedNode
, showSidePanel :: Boolean
, showControls :: Boolean
}
initialState :: State
...
...
@@ -57,6 +59,7 @@ initialState = State
, legendData : []
, selectedNode : Nothing
, showSidePanel : false
, showControls : false
}
graphSpec :: Spec State {} Action
...
...
@@ -81,6 +84,10 @@ performAction (SelectNode node) _ _ = void do
performAction (ShowSidePanel) _ (State state) = void do
modifyState $ \(State s) -> State s {showSidePanel = not (state.showSidePanel) }
performAction (ShowControls) _ (State state) = void do
modifyState $ \(State s) -> State s {showControls = not (state.showControls) }
convert :: GraphData -> SigmaGraphData
convert (GraphData r) = SigmaGraphData { nodes, edges}
where
...
...
@@ -273,8 +280,21 @@ specOld = simpleSpec performAction render'
where
render' :: Render State {} Action
render' d _ (State st) _ =
[ div [className "row"] [
div [className "col-md-12", style {marginBottom : "21px"}]
[ div [className "row"]
[
div [className "col-md-12"]
[ button [className "btn btn-primary"
, onClick \_ -> d ShowControls
,style {position:"relative",top:"-25px",left: "737px"}
]
[text "Show Controls"]
, button [className "btn btn-primary"
, style {position:"relative",top:"-25px",left: "1380px"}
,onClick \_ -> d ShowSidePanel
] [text "showSidePanel"]
]
, if (st.showControls) then
div [className "col-md-12", style {marginBottom : "21px"}]
[ menu [_id "toolbar"]
[ ul'
[
...
...
@@ -341,6 +361,7 @@ specOld = simpleSpec performAction render'
]
]
]
else div [] []
]
, div [className "row"]
[ div [if (st.showSidePanel) then className "col-md-10" else className "col-md-11"]
...
...
@@ -368,7 +389,7 @@ specOld = simpleSpec performAction render'
<>
if length st.legendData > 0 then [div [style {position : "absolute", bottom : "10px", border: "1px solid black", boxShadow : "rgb(0, 0, 0) 0px 2px 6px", marginLeft : "10px", padding: "16px"}] [dispLegend st.legendData]] else []
]
, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"0px",position : "relative",zIndex:"1000"}] [text "show sidep
anel"]
--, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"39px",position : "relative",zIndex:"1000", top: "-59px"}] [text "Show SideP
anel"]
, if (st.showSidePanel) then
div [_id "sp-container",className "col-md-2", style {border : "1px black solid", backgroundColor : "beige", position:"absolute",right: "0px",top:"265px"}]
[ div [className "row"]
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
2a9c6329
...
...
@@ -134,7 +134,7 @@ layout1 layout =
]
ls = over _render \render d p s c -> [
button [onClick $ \e -> d ShowTree, className "btn btn-primary",style {position:"relative", top: "
68
px",left:"-264px",zIndex : "1000"}] [text "ShowTree"]
button [onClick $ \e -> d ShowTree, className "btn btn-primary",style {position:"relative", top: "
99
px",left:"-264px",zIndex : "1000"}] [text "ShowTree"]
, div [if (s.showTree) then className "col-md-2" else className "col-md-2"] if (s.showTree) then (render d p s c) else []
]
...
...
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