Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filepicker - hide empty create action box if creation is not allowed #28020

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ code {
max-height: 36px;
max-width: 36px;
background-color: var(--color-background-dark);
border: 1px solid var(--color-border-dark);
border-radius: var(--border-radius-pill);
position: relative;
left: 15px;
Expand All @@ -797,8 +796,8 @@ code {
.icon.icon-add{
background-image: var(--icon-add-000);
background-size: 16px 16px;
width: 34px;
height: 34px;
width: 36px;
height: 36px;
margin: 0px;
opacity: 0.5;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/OC/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const Dialogs = {

var newButton = self.$filePicker.find('.actions.creatable .button-add')
if (type === self.FILEPICKER_TYPE_CHOOSE && !options.allowDirectoryChooser) {
newButton.hide()
self.$filePicker.find('.actions.creatable').hide()
Copy link
Contributor Author

@szaimen szaimen Jul 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, none of those commands (neither the old nor the new) seem to have any effect in my testing so I really don't know how to fix this from the javascript side...

}
newButton.on('focus', function() {
self.$filePicker.ocdialog('setEnterCallback', function() {
Expand Down