Commit 7835cad1 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-scroll-fix' of...

Merge branch 'dev-scroll-fix' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents 1833bad9 b4f21c5f
...@@ -102,25 +102,24 @@ li#rename #rename-a { ...@@ -102,25 +102,24 @@ li#rename #rename-a {
min-width: 200px; min-width: 200px;
} }
li a#rename { li .leaf {
display: none; display: flex;
position: absolute; flex-direction: row;
text-decoration: none; justify-content: flex-start;
left: 26px;
} }
li a#rename-leaf { li .leaf .folder-icon {
display: none; padding: 0 2 0 2;
position: absolute;
text-decoration: none;
margin-left: 20px;
cursor: pointer;
z-index: 1;
} }
li:hover a#rename { li .leaf a.settings {
cursor: pointer;
display: block; display: block;
padding: 0 2 0 2;
text-decoration: none;
visibility: hidden;
z-index: 1;
} }
li:hover a#rename-leaf { li .leaf:hover a.settings {
display: block; visibility: visible;
} }
.glyphitem { .glyphitem {
......
...@@ -95,26 +95,25 @@ li#rename ...@@ -95,26 +95,25 @@ li#rename
min-width: 200px min-width: 200px
li li
a#rename .leaf
display: none display: flex
position: absolute flex-direction: row
text-decoration: none justify-content: flex-start
left: 26px
a#rename-leaf .folder-icon
display: none padding: 0 2 0 2
position: absolute
text-decoration: none a.settings
margin-left: 20px
cursor: pointer cursor: pointer
display: block
padding: 0 2 0 2
text-decoration: none
visibility: hidden
z-index: 1 z-index: 1
&:hover &:hover
a#rename a.settings
display: block visibility: visible
a#rename-leaf
display: block
.glyphitem .glyphitem
......
...@@ -76,14 +76,6 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el ...@@ -76,14 +76,6 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
pure $ H.span (dropProps droppedFile isDragOver) $ pure $ H.span (dropProps droppedFile isDragOver) $
[ folderIcon nodeType folderOpen [ folderIcon nodeType folderOpen
, H.a { href: (url frontends (GT.NodePath (sessionId session) nodeType (Just id)))
, style: { marginLeft: case nodeType of
NodeUser -> "1rem"
_ -> "22px"
}
}
[ nodeText { isSelected: (mCorpusId mCurrentRoute) == (Just id)
, name: name' props} ]
, if showBox then , if showBox then
Popover.popover { open: false Popover.popover { open: false
, onClose: \_ -> pure unit , onClose: \_ -> pure unit
...@@ -93,6 +85,10 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el ...@@ -93,6 +85,10 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
, mNodePopupView props (onPopoverClose popoverRef) , mNodePopupView props (onPopoverClose popoverRef)
] ]
else H.div {} [] else H.div {} []
, H.a { href: (url frontends (GT.NodePath (sessionId session) nodeType (Just id)))
}
[ nodeText { isSelected: (mCorpusId mCurrentRoute) == (Just id)
, name: name' props} ]
, fileTypeView {dispatch, droppedFile, id, isDragOver, nodeType} , fileTypeView {dispatch, droppedFile, id, isDragOver, nodeType}
, H.div {} (map (\t -> asyncProgressBar { asyncTask: t , H.div {} (map (\t -> asyncProgressBar { asyncTask: t
, corpusId: id , corpusId: id
...@@ -107,13 +103,12 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el ...@@ -107,13 +103,12 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
name' {name, nodeType} = if nodeType == GT.NodeUser then show session else name name' {name, nodeType} = if nodeType == GT.NodeUser then show session else name
folderIcon nodeType folderOpen'@(open /\ _) = folderIcon nodeType folderOpen'@(open /\ _) =
H.a {onClick: R2.effToggler folderOpen'} H.a { className: "folder-icon"
, onClick: R2.effToggler folderOpen' }
[ H.i {className: GT.fldr nodeType open} [] ] [ H.i {className: GT.fldr nodeType open} [] ]
popOverIcon = popOverIcon =
H.a { className: "glyphicon glyphicon-cog" H.a { className: "settings fa fa-cog" } []
, id: "rename-leaf"
} []
mNodePopupView props@{asyncTasks, id, nodeType} onPopoverClose = mNodePopupView props@{asyncTasks, id, nodeType} onPopoverClose =
nodePopupView { id nodePopupView { id
...@@ -125,7 +120,7 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el ...@@ -125,7 +120,7 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
} }
dropProps droppedFile isDragOver = dropProps droppedFile isDragOver =
{ className: dropClass droppedFile isDragOver { className: "leaf " <> (dropClass droppedFile isDragOver)
, on: { drop: dropHandler droppedFile , on: { drop: dropHandler droppedFile
, dragOver: onDragOverHandler isDragOver , dragOver: onDragOverHandler isDragOver
, dragLeave: onDragLeave isDragOver } } , dragLeave: onDragLeave isDragOver } }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment