Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signature Frontend
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
Electronic Signature Service
Signature Frontend
Commits
de7fa77e
Unverified
Commit
de7fa77e
authored
5 years ago
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Fix memory/inspect bug and implement new file block layout for successful and failed files (
#5
)
parent
45540357
No related branches found
No related tags found
No related merge requests found
Pipeline
#11223
passed
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vpu-qualified-signature-pdf-upload.js
+60
-25
60 additions, 25 deletions
src/vpu-qualified-signature-pdf-upload.js
with
60 additions
and
25 deletions
src/vpu-qualified-signature-pdf-upload.js
+
60
−
25
View file @
de7fa77e
...
@@ -540,7 +540,14 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -540,7 +540,14 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
align-items: center;
align-items: center;
grid-template-columns: auto 40px;
grid-template-columns: auto 40px;
grid-gap: 10px;
grid-gap: 10px;
margin-bottom: 10px;
}
.file-block.error .header {
grid-template-columns: auto 80px;
}
.file-block.error .header .buttons {
white-space: nowrap;
}
}
.file-block div.bottom-line {
.file-block div.bottom-line {
...
@@ -548,6 +555,11 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -548,6 +555,11 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
align-items: center;
align-items: center;
grid-template-columns: auto 190px;
grid-template-columns: auto 190px;
grid-gap: 10px;
grid-gap: 10px;
margin-top: 10px;
}
.file-block.error div.bottom-line {
display: block;
}
}
.file-block div.bottom-line .headline {
.file-block div.bottom-line .headline {
...
@@ -605,14 +617,26 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -605,14 +617,26 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
* @returns {*[]}
* @returns {*[]}
*/
*/
getSignedFilesHtml
()
{
getSignedFilesHtml
()
{
return
this
.
signedFiles
.
map
(
file
=>
html
`
const
ids
=
Object
.
keys
(
this
.
signedFiles
);
let
results
=
[];
ids
.
forEach
((
id
)
=>
{
const
file
=
this
.
signedFiles
[
id
];
results
.
push
(
html
`
<div class="file-block">
<div class="file-block">
<a class="is-download"
<div class="header">
<span>
${
file
.
name
}
(
${
humanFileSize
(
file
.
contentSize
)}
)</span>
<button class="button close"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.download-file-button-title
'
)}
"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.download-file-button-title
'
)}
"
@click="
${()
=>
{
this
.
fileDownloadClickHandler
(
file
);
}}
">
@click="
${()
=>
{
this
.
fileDownloadClickHandler
(
file
);
}}
">
${
file
.
name
}
(
${
humanFileSize
(
file
.
contentSize
)}
) <vpu-icon name="download"></vpu-icon></a>
<vpu-icon name="download"></vpu-icon></button>
</div>
</div>
</div>
`
);
`
);
});
return
results
;
}
}
/**
/**
...
@@ -621,23 +645,34 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -621,23 +645,34 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
* @returns {*[]}
* @returns {*[]}
*/
*/
getErrorFilesHtml
()
{
getErrorFilesHtml
()
{
return
this
.
errorFiles
.
map
((
data
,
id
)
=>
html
`
const
ids
=
Object
.
keys
(
this
.
errorFiles
);
<div class="file-block">
let
results
=
[];
<div class="button-box">
<button class="button is-small"
ids
.
forEach
((
id
)
=>
{
const
data
=
this
.
errorFiles
[
id
];
results
.
push
(
html
`
<div class="file-block error">
<div class="header">
<span>
${
data
.
file
.
name
}
(
${
humanFileSize
(
data
.
file
.
size
)}
)</span>
<div class="buttons">
<button class="button"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.re-upload-file-button-title
'
)}
"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.re-upload-file-button-title
'
)}
"
@click="
${()
=>
{
this
.
fileQueueingClickHandler
(
data
.
file
,
id
);}}
"><vpu-icon name="reload"></vpu-icon></button>
@click="
${()
=>
{
this
.
fileQueueingClickHandler
(
data
.
file
,
id
);}}
"><vpu-icon name="reload"></vpu-icon></button>
</div>
<button class="button"
<div class="info">
${
data
.
file
.
name
}
(
${
humanFileSize
(
data
.
file
.
size
)}
)
<strong class="error">
${
data
.
json
[
"
hydra:description
"
]}
</strong>
<a class="is-remove"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.remove-failed-file-button-title
'
)}
"
title="
${
i18n
.
t
(
'
qualified-pdf-upload.remove-failed-file-button-title
'
)}
"
@click="
${()
=>
{
this
.
takeFailedFileFromQueue
(
id
);
}}
">
@click="
${()
=>
{
this
.
takeFailedFileFromQueue
(
id
);
}}
">
<vpu-icon name="close"></vpu-icon></a>
<vpu-icon name="close"></vpu-icon></button>
</div>
</div>
<div class="bottom-line">
<strong class="error">
${
data
.
json
[
"
hydra:description
"
]}
</strong>
</div>
</div>
</div>
</div>
`
);
`
);
});
return
results
;
}
}
hasSignaturePermissions
()
{
hasSignaturePermissions
()
{
...
...
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