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
9b94319d
Commit
9b94319d
authored
Jun 10, 2020
by
Neuber, Eugen Ramon
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete empty lines
See issues
#12
and
#14
parent
c0633440
No related branches found
No related tags found
1 merge request
!1
Official Signature: pdf preview and positioning
Pipeline
#11632
passed with warnings
Jun 10, 2020
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vpu-official-signature-pdf-upload.js
+0
-160
0 additions, 160 deletions
src/vpu-official-signature-pdf-upload.js
with
0 additions
and
160 deletions
src/vpu-official-signature-pdf-upload.js
+
0
−
160
View file @
9b94319d
...
...
@@ -21,7 +21,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
super
();
this
.
lang
=
i18n
.
language
;
this
.
entryPointUrl
=
commonUtils
.
getAPiUrl
();
this
.
signedFiles
=
[];
this
.
signedFilesCount
=
0
;
this
.
errorFiles
=
[];
...
...
@@ -46,10 +45,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
this
.
currentPreviewQueueKey
=
''
;
// will be set in function update
this
.
signingUrl
=
""
;
}
static
get
scopedElements
()
{
...
...
@@ -76,7 +72,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
queueingInProgress
:
{
type
:
Boolean
,
attribute
:
false
},
uploadStatusFileName
:
{
type
:
String
,
attribute
:
false
},
uploadStatusText
:
{
type
:
String
,
attribute
:
false
},
signingProcessEnabled
:
{
type
:
Boolean
,
attribute
:
false
},
signingProcessActive
:
{
type
:
Boolean
,
attribute
:
false
},
queueBlockEnabled
:
{
type
:
Boolean
,
attribute
:
false
},
...
...
@@ -92,24 +87,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
super
.
connectedCallback
();
// needs to be called in a function to get the variable scope of "this"
setInterval
(()
=>
{
this
.
handleQueuedFiles
();
},
1000
);
}
/* disconnectedCallback()
*/
onQueuedFilesChanged
(
ev
)
{
const
detail
=
ev
.
detail
;
if
(
!
this
.
queueBlockEnabled
&&
detail
.
queuedFilesCount
)
...
...
@@ -122,13 +101,10 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
* Processes queued files
*/
async
handleQueuedFiles
()
{
this
.
endSigningProcessIfQueueEmpty
();
if
(
this
.
queuedFilesCount
===
0
)
{
// reset signingProcessEnabled button
this
.
signingProcessEnabled
=
false
;
return
;
}
...
...
@@ -147,7 +123,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
// set placement mode and parameters to restore them when canceled
this
.
currentFilePlacementMode
=
this
.
queuedFilesPlacementModes
[
key
];
this
.
currentFileSignaturePlacement
=
this
.
queuedFilesSignaturePlacements
[
key
];
this
.
uploadInProgress
=
true
;
let
params
=
{};
...
...
@@ -214,7 +189,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
if
(
this
.
queuedFilesSignaturePlacements
[
this
.
currentPreviewQueueKey
]
===
undefined
)
{
this
.
queuedFilesPlacementModes
[
this
.
currentPreviewQueueKey
]
=
"
auto
"
;
}
this
.
signaturePlacementInProgress
=
false
;
}
...
...
@@ -259,84 +233,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
event
.
returnValue
=
''
;
}
/* onReceiveIframeMessage(event)
*/
endSigningProcessIfQueueEmpty
()
{
if
(
this
.
queuedFilesCount
===
0
&&
this
.
signingProcessActive
)
{
this
.
signingProcessActive
=
false
;
...
...
@@ -394,15 +290,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
this
.
signedFiles
.
push
(
ev
.
detail
.
json
);
// this triggers the correct update() execution
this
.
signedFilesCount
++
;
const
entryPoint
=
data
.
json
;
this
.
currentFileName
=
entryPoint
.
name
;
this
.
endSigningProcessIfQueueEmpty
();
}
}
...
...
@@ -416,7 +305,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
case
"
entryPointUrl
"
:
JSONLD
.
initialize
(
this
.
entryPointUrl
,
(
jsonld
)
=>
{
const
apiUrlBase
=
jsonld
.
getApiUrlForEntityName
(
"
OfficiallySignedDocument
"
);
this
.
signingUrl
=
apiUrlBase
+
"
/sign
"
;
});
break
;
...
...
@@ -498,7 +386,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
*/
async
fileQueueingClickHandler
(
file
,
id
)
{
this
.
takeFailedFileFromQueue
(
id
);
return
this
.
_
(
"
#file-upload
"
).
queueFile
(
file
);
}
...
...
@@ -520,7 +407,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
// start signature placement process
this
.
signaturePlacementInProgress
=
true
;
this
.
withSigBlock
=
withSigBlock
;
const
previewTag
=
this
.
constructor
.
getScopedTagName
(
"
vpu-pdf-preview
"
);
await
this
.
_
(
previewTag
).
showPDF
(
file
,
...
...
@@ -545,7 +431,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
takeFailedFileFromQueue
(
key
)
{
const
file
=
this
.
errorFiles
.
splice
(
key
,
1
);
this
.
errorFilesCount
=
Object
.
keys
(
this
.
errorFiles
).
length
;
return
file
;
}
...
...
@@ -603,16 +488,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
display: none;
}
.files-block.field:not(:last-child) {
margin-bottom: 40px;
}
...
...
@@ -923,25 +798,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
return
this
.
_hasSignaturePermissions
(
'
ROLE_SCOPE_OFFICIAL-SIGNATURE
'
);
}
/* stopSigningProcess()
*/
render
()
{
return
html
`
<div class="
${
classMap
({
hidden
:
!
this
.
isLoggedIn
()
||
!
this
.
hasSignaturePermissions
()
||
this
.
isLoading
()})}
">
...
...
@@ -1077,22 +933,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitElem
<strong>
${
this
.
uploadStatusFileName
}
</strong>
${
this
.
uploadStatusText
}
</div>
<!-- External auth -->
</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