Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
cf3e011e
Commit
cf3e011e
authored
1 year ago
by
vkovtun
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13579: Added two upload buttons in a popup.
parent
59f7c857
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ui-admin/src/js/components/database/data-browser/DataBrowser.jsx
+1
-2
1 addition, 2 deletions
...n/src/js/components/database/data-browser/DataBrowser.jsx
ui-admin/src/js/components/database/data-browser/Toolbar.jsx
+72
-6
72 additions, 6 deletions
ui-admin/src/js/components/database/data-browser/Toolbar.jsx
with
73 additions
and
8 deletions
ui-admin/src/js/components/database/data-browser/DataBrowser.jsx
+
1
−
2
View file @
cf3e011e
...
@@ -146,8 +146,7 @@ class DataBrowser extends React.Component {
...
@@ -146,8 +146,7 @@ class DataBrowser extends React.Component {
<
div
className
=
{
[
classes
.
flexContainer
,
classes
.
boundary
,
classes
.
content
].
join
(
'
'
)
}
>
<
div
className
=
{
[
classes
.
flexContainer
,
classes
.
boundary
,
classes
.
content
].
join
(
'
'
)
}
>
{
viewType
===
'
list
'
&&
(
{
viewType
===
'
list
'
&&
(
<
Grid
<
Grid
// id={id}
id
=
'data-browser-grid'
// settingsId={id}
filterModes
=
{
[
GridFilterOptions
.
COLUMN_FILTERS
]
}
filterModes
=
{
[
GridFilterOptions
.
COLUMN_FILTERS
]
}
header
=
'Files'
header
=
'Files'
classes
=
{
{
container
:
classes
.
grid
}
}
classes
=
{
{
container
:
classes
.
grid
}
}
...
...
This diff is collapsed.
Click to expand it.
ui-admin/src/js/components/database/data-browser/Toolbar.jsx
+
72
−
6
View file @
cf3e011e
...
@@ -29,8 +29,12 @@ import autoBind from 'auto-bind'
...
@@ -29,8 +29,12 @@ import autoBind from 'auto-bind'
import
{
ToggleButton
}
from
'
@material-ui/lab
'
import
{
ToggleButton
}
from
'
@material-ui/lab
'
import
Button
from
'
@material-ui/core/Button
'
import
Button
from
'
@material-ui/core/Button
'
import
IconButton
from
'
@material-ui/core/IconButton
'
import
IconButton
from
'
@material-ui/core/IconButton
'
import
Container
from
"
@src/js/components/common/form/Container.jsx
"
;
import
Popover
from
"
@material-ui/core/Popover
"
;
const
color
=
'
secondary
'
const
color
=
'
secondary
'
const
buttonSize
=
'
small
'
const
iconButtonSize
=
'
medium
'
const
styles
=
(
theme
)
=>
({
const
styles
=
(
theme
)
=>
({
toolbar
:
{
toolbar
:
{
...
@@ -60,6 +64,13 @@ const styles = (theme) => ({
...
@@ -60,6 +64,13 @@ const styles = (theme) => ({
'
& *
'
:
{
'
& *
'
:
{
color
:
theme
.
palette
[
color
].
main
color
:
theme
.
palette
[
color
].
main
}
}
},
uploadButtonsContainer
:
{
display
:
'
flex
'
,
flexDirection
:
'
column
'
},
marginBottom
:
{
marginBottom
:
theme
.
spacing
(
1
)
}
}
})
})
...
@@ -70,13 +81,52 @@ class Toolbar extends React.Component {
...
@@ -70,13 +81,52 @@ class Toolbar extends React.Component {
autoBind
(
this
)
autoBind
(
this
)
this
.
controller
=
this
.
props
.
controller
this
.
controller
=
this
.
props
.
controller
this
.
state
=
{
el
:
null
}
}
handleOpen
(
event
)
{
this
.
setState
({
el
:
event
.
currentTarget
})
}
handleClose
()
{
this
.
setState
({
el
:
null
})
}
renderUploadButtons
()
{
const
{
classes
}
=
this
.
props
return
(
<
div
className
=
{
classes
.
uploadButtonsContainer
}
>
<
Button
classes
=
{
{
root
:
[
classes
.
button
,
classes
.
marginBottom
].
join
(
'
'
)
}
}
color
=
{
color
}
size
=
{
buttonSize
}
variant
=
'contained'
// onClick={this.controller.handleNewFolderClick}
>
File upload
</
Button
>
<
Button
classes
=
{
{
root
:
classes
.
button
}
}
color
=
{
color
}
size
=
{
buttonSize
}
variant
=
'contained'
// onClick={this.controller.handleNewFolderClick}
>
Folder upload
</
Button
>
</
div
>
)
}
}
render
()
{
render
()
{
const
{
viewType
,
onViewTypeChange
,
classes
,
showInfo
,
onShowInfoChange
}
=
const
{
viewType
,
onViewTypeChange
,
classes
,
showInfo
,
onShowInfoChange
}
=
this
.
props
this
.
props
const
{
el
}
=
this
.
state
const
buttonSize
=
'
small
'
const
iconButtonSize
=
'
medium
'
return
(
return
(
<
div
className
=
{
classes
.
toolbar
}
>
<
div
className
=
{
classes
.
toolbar
}
>
<
div
className
=
{
[
classes
.
buttons
,
classes
.
leftSection
].
join
(
'
'
)
}
>
<
div
className
=
{
[
classes
.
buttons
,
classes
.
leftSection
].
join
(
'
'
)
}
>
...
@@ -145,12 +195,28 @@ class Toolbar extends React.Component {
...
@@ -145,12 +195,28 @@ class Toolbar extends React.Component {
classes
=
{
{
root
:
classes
.
button
}
}
classes
=
{
{
root
:
classes
.
button
}
}
color
=
{
color
}
color
=
{
color
}
size
=
{
buttonSize
}
size
=
{
buttonSize
}
variant
=
'
conta
ined'
variant
=
'
outl
ined'
startIcon
=
{
<
PublishIcon
/>
}
startIcon
=
{
<
PublishIcon
/>
}
onClick
=
{
this
.
controller
.
handleUploadClick
}
onClick
=
{
this
.
handleOpen
}
>
>
{
messages
.
get
(
messages
.
UPLOAD
)
}
{
messages
.
get
(
messages
.
UPLOAD
)
}
</
Button
>
</
Button
>
<
Popover
id
=
{
'
toolbar.columns-popup-id
'
}
open
=
{
Boolean
(
el
)
}
anchorEl
=
{
el
}
onClose
=
{
this
.
handleClose
}
anchorOrigin
=
{
{
vertical
:
'
bottom
'
,
horizontal
:
'
left
'
}
}
transformOrigin
=
{
{
vertical
:
'
top
'
,
horizontal
:
'
left
'
}
}
>
<
Container
square
=
{
true
}
>
{
this
.
renderUploadButtons
()
}
</
Container
>
</
Popover
>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
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