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
GitLab 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
6bac20fb
Commit
6bac20fb
authored
3 years ago
by
Steinwender, Tamara
Browse files
Options
Downloads
Patches
Plain Diff
Fix clipboard bug: placeholder is shown on filled table and disabled buttons bug
parent
06350c06
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#106147
failed
3 years ago
Stage: test
Stage: deploy
Stage: e2e
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/file-handling/src/clipboard.js
+18
-41
18 additions, 41 deletions
packages/file-handling/src/clipboard.js
packages/file-handling/src/file-source.js
+1
-1
1 addition, 1 deletion
packages/file-handling/src/file-source.js
with
19 additions
and
42 deletions
packages/file-handling/src/clipboard.js
+
18
−
41
View file @
6bac20fb
...
@@ -237,7 +237,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -237,7 +237,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this
.
tabulatorTable
.
on
(
"
tableBuilt
"
,
this
.
tableBuiltFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
tableBuilt
"
,
this
.
tableBuiltFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
rowClick
"
,
this
.
rowClickFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
rowClick
"
,
this
.
rowClickFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
rowSelectionChanged
"
,
this
.
rowSelectionChangedFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
rowSelectionChanged
"
,
this
.
rowSelectionChangedFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
data
Load
ed
"
,
this
.
data
Load
edFunction
.
bind
(
this
));
this
.
tabulatorTable
.
on
(
"
data
Chang
ed
"
,
this
.
data
Chang
edFunction
.
bind
(
this
));
});
});
//Register only one beforeunload Event for the clipboard warning
//Register only one beforeunload Event for the clipboard warning
...
@@ -292,7 +292,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -292,7 +292,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
}
}
}
}
data
Load
edFunction
()
{
data
Chang
edFunction
()
{
if
(
this
.
tabulatorTable
!==
null
)
{
if
(
this
.
tabulatorTable
!==
null
)
{
const
that
=
this
;
const
that
=
this
;
...
@@ -328,7 +328,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -328,7 +328,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this
.
tabulatorTable
.
off
(
"
tableBuilt
"
);
this
.
tabulatorTable
.
off
(
"
tableBuilt
"
);
this
.
tabulatorTable
.
off
(
"
rowClick
"
);
this
.
tabulatorTable
.
off
(
"
rowClick
"
);
this
.
tabulatorTable
.
off
(
"
rowSelectionChanged
"
);
this
.
tabulatorTable
.
off
(
"
rowSelectionChanged
"
);
this
.
tabulatorTable
.
off
(
"
data
Load
ed
"
);
this
.
tabulatorTable
.
off
(
"
data
Chang
ed
"
);
}
}
/**
/**
...
@@ -409,7 +409,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -409,7 +409,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
/**
/**
* If clipboard files and the tabulator table exists, then clear the table and sets the new data
* If clipboard files and the tabulator table exists, then clear the table and sets the new data
*
*
s
*/
*/
generateClipboardTable
()
{
generateClipboardTable
()
{
this
.
numberOfSelectedFiles
=
0
;
this
.
numberOfSelectedFiles
=
0
;
...
@@ -428,10 +428,20 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -428,10 +428,20 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this
.
tabulatorTable
.
clearData
();
this
.
tabulatorTable
.
clearData
();
this
.
tabulatorTable
.
setData
(
data
);
this
.
tabulatorTable
.
setData
(
data
);
if
(
this
.
clipboardFiles
.
files
.
length
>
0
)
{
let
placeholders
=
this
.
_a
(
"
.tabulator-placeholder
"
);
if
(
placeholders
)
placeholders
.
forEach
(
placeholder
=>
placeholder
.
style
.
display
=
"
none
"
);
}
else
{
let
placeholders
=
this
.
_a
(
"
.tabulator-placeholder
"
);
if
(
placeholders
)
placeholders
.
forEach
(
placeholder
=>
placeholder
.
style
.
display
=
"
inherit
"
);
}
}
}
if
(
this
.
_
(
'
#select_all
'
))
{
if
(
this
.
_
(
'
#select_all
'
))
{
this
.
_
(
'
#select_all
'
).
checked
=
false
;
this
.
_
(
'
#select_all
'
).
checked
=
false
;
}
}
}
}
/**
/**
...
@@ -442,7 +452,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -442,7 +452,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
async
sendClipboardFiles
(
files
)
{
async
sendClipboardFiles
(
files
)
{
const
i18n
=
this
.
_i18n
;
const
i18n
=
this
.
_i18n
;
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
await
this
.
sendFileEvent
(
files
[
i
].
file
);
await
this
.
sendFileEvent
(
files
[
i
].
file
,
files
.
length
);
}
}
this
.
tabulatorTable
.
deselectRow
();
this
.
tabulatorTable
.
deselectRow
();
send
({
send
({
...
@@ -453,8 +463,8 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -453,8 +463,8 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
});
});
}
}
async
sendFileEvent
(
file
)
{
async
sendFileEvent
(
file
,
maxFiles
)
{
const
data
=
{
file
:
file
,
data
:
file
};
const
data
=
{
file
:
file
,
data
:
file
,
maxUpload
:
maxFiles
};
const
event
=
new
CustomEvent
(
'
dbp-clipboard-file-picker-file-downloaded
'
,
{
const
event
=
new
CustomEvent
(
'
dbp-clipboard-file-picker-file-downloaded
'
,
{
detail
:
data
,
detail
:
data
,
bubbles
:
true
,
bubbles
:
true
,
...
@@ -517,6 +527,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -517,6 +527,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
}
else
{
}
else
{
files
=
files
.
concat
(
event
.
detail
.
file
);
files
=
files
.
concat
(
event
.
detail
.
file
);
}
}
this
.
filesToSave
=
files
;
this
.
filesToSave
=
files
;
if
(
files
&&
files
.
length
!==
0
)
{
if
(
files
&&
files
.
length
!==
0
)
{
data
=
{
files
:
files
};
data
=
{
files
:
files
};
...
@@ -908,24 +919,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -908,24 +919,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
justify-content: space-between;
justify-content: space-between;
}
}
.tabulator .tabulator-tableHolder .tabulator-placeholder span {
margin: initial;
}
/*
.checkmark {
height: 20px;
width: 20px;
left: 11px;
top: 4px;
}
.button-container .checkmark::after {
left: 8px;
top: 3px;
width: 4px;
height: 11px;
}*/
.table-wrapper {
.table-wrapper {
position: relative;
position: relative;
}
}
...
@@ -987,22 +980,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
...
@@ -987,22 +980,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
display: block;
display: block;
}
}
/* .checkmark {
height: 25px;
width: 25px;
left: 9px;
top: 2px;
}
.button-container .checkmark::after {
left: 8px;
top: 2px;
width: 8px;
height: 15px;
}
*/
.btn-flex-container-mobile {
.btn-flex-container-mobile {
flex-direction: column;
flex-direction: column;
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/file-handling/src/file-source.js
+
1
−
1
View file @
6bac20fb
...
@@ -548,7 +548,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
...
@@ -548,7 +548,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
nextcloud-file-url="
${
this
.
nextcloudFileURL
}
"
nextcloud-file-url="
${
this
.
nextcloudFileURL
}
"
allowed-mime-types="
${
this
.
allowedMimeTypes
}
"
allowed-mime-types="
${
this
.
allowedMimeTypes
}
"
@dbp-clipboard-file-picker-file-downloaded="
${(
event
)
=>
{
@dbp-clipboard-file-picker-file-downloaded="
${(
event
)
=>
{
this
.
sendFileEvent
(
event
.
detail
.
file
);
this
.
sendFileEvent
(
event
.
detail
.
file
,
event
.
detail
.
maxUpload
);
}}
"></dbp-clipboard>
}}
"></dbp-clipboard>
`
;
`
;
}
}
...
...
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