Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Toolkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Web Component Framework
Toolkit
Commits
89672ca1
Commit
89672ca1
authored
3 years ago
by
Tögl, Christina
Browse files
Options
Downloads
Patches
Plain Diff
Fix overflow for special breadcrumbs
parent
65bae54c
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
packages/file-handling/src/nextcloud-file-picker.js
+21
-15
21 additions, 15 deletions
packages/file-handling/src/nextcloud-file-picker.js
with
21 additions
and
15 deletions
packages/file-handling/src/nextcloud-file-picker.js
+
21
−
15
View file @
89672ca1
...
...
@@ -1856,19 +1856,21 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
}}
" title="
${
i18n
.
t
(
'
nextcloud-file-picker.folder-home
'
)}
"><dbp-icon name="home"></dbp-icon> </a></span>`
;
if
(
this
.
isInFavorites
)
{
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb"><a @click="
${()
=>
{
this
.
load
Directory
(
path
);
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb
special
"><a @click="
${()
=>
{
this
.
load
Favorites
(
);
}}
" title="
${
i18n
.
t
(
'
nextcloud-file-picker.favorites-title
'
)}
">
${
i18n
.
t
(
'
nextcloud-file-picker.favorites-title
'
)}
</a></span>`
;
}
else
if
(
this
.
isInRecent
)
{
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb"><a @click="
${()
=>
{
this
.
load
Directory
(
path
);
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb
special
"><a @click="
${()
=>
{
this
.
load
AllRecentFiles
(
);
}}
" title="
${
i18n
.
t
(
'
nextcloud-file-picker.recent-files-title
'
)}
">
${
i18n
.
t
(
'
nextcloud-file-picker.recent-files-title
'
)}
</a></span>`
;
}
else
if
(
this
.
isInFilteredRecent
)
{
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb"><a @click="
${()
=>
{
this
.
load
Directory
(
path
);
htmlpath
[
1
]
=
html
`<span> › </span><span class="breadcrumb
special
"><a @click="
${()
=>
{
this
.
load
MyRecentFiles
(
);
}}
" title="
${
i18n
.
t
(
'
nextcloud-file-picker.my-recent-files-title
'
)}
">
${
i18n
.
t
(
'
nextcloud-file-picker.my-recent-files-title
'
)}
</a></span>`
;
}
else
{
// case normal folders
const
directories
=
this
.
directoryPath
.
split
(
'
/
'
);
...
...
@@ -1938,35 +1940,35 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
// computations for overflow - begin
//if (this.menuHeightBreadcrumb === -1) {
this
.
menuHeightBreadcrumb
=
menu
.
clientHeight
;
console
.
log
(
"
menuheight:
"
,
this
.
menuHeightBreadcrumb
);
//
console.log("menuheight: ", this.menuHeightBreadcrumb);
//}
let
topValue
=
menuStart
.
getBoundingClientRect
().
bottom
;
console
.
log
(
"
topValue
"
,
topValue
);
//
console.log("topValue", topValue);
let
isMenuOverflow
=
this
.
menuHeightBreadcrumb
+
topValue
>=
this
.
_
(
'
.wrapper
'
).
offsetHeight
?
true
:
false
;
console
.
log
(
"
modal.offsetHeight:
"
,
this
.
_
(
'
.wrapper
'
).
offsetHeight
);
console
.
log
(
"
ismenuoverflow:
"
,
isMenuOverflow
);
console
.
log
(
"
navigation height:
"
,
this
.
_
(
'
.nextcloud-nav
'
).
offsetHeight
);
//
console.log("modal.offsetHeight: ", this._('.wrapper').offsetHeight);
//
console.log("ismenuoverflow: ", isMenuOverflow);
//
console.log("navigation height: ", this._('.nextcloud-nav').offsetHeight);
//set max-width to window with
let
maxWidth
=
this
.
_
(
'
.wrapper
'
).
offsetWidth
;
console
.
log
(
"
offsetWidth
"
,
maxWidth
);
//
console.log ("offsetWidth", maxWidth);
if
(
isMenuOverflow
&&
!
menu
.
classList
.
contains
(
'
hidden
'
))
{
let
actualHeight
=
this
.
_
(
'
.wrapper
'
).
offsetHeight
-
this
.
_
(
'
.nextcloud-nav
'
).
offsetHeight
;
console
.
log
(
"
actual height:
"
,
actualHeight
);
//
console.log("actual height: ", actualHeight);
menu
.
setAttribute
(
'
style
'
,
'
position: fixed;top:
'
+
topValue
+
'
px;height:
'
+
actualHeight
+
'
px;max-width:
'
+
maxWidth
+
'
px;overflow-y: auto;
'
);
menu
.
scrollTop
=
0
;
document
.
body
.
setAttribute
(
'
style
'
,
'
overflow:hidden;
'
);
//TODO
delete?
document
.
body
.
setAttribute
(
'
style
'
,
'
overflow:hidden;
'
);
//TODO
replace with correct scrollbar remove
}
else
if
(
isMenuOverflow
&&
menu
.
classList
.
contains
(
'
hidden
'
))
{
console
.
log
(
"
isMenuOverflow AND hidden - remove attributes
"
);
document
.
body
.
removeAttribute
(
'
style
'
,
'
overflow:hidden;
'
);
//TODO
delete?
document
.
body
.
removeAttribute
(
'
style
'
,
'
overflow:hidden;
'
);
//TODO
replace with correct scrollbar remove
menu
.
removeAttribute
(
'
style
'
);
...
...
@@ -2065,6 +2067,10 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
${
commonStyles
.
getRadioAndCheckboxCss
()}
${
fileHandlingStyles
.
getFileHandlingCss
()}
.breadcrumb.special a {
overflow: visible;
}
.extended-breadcrumb-menu li a {
max-width: none;
display: inline;
...
...
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