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
b57a0721
Unverified
Commit
b57a0721
authored
May 27, 2020
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Fix signature positioning mode when new items are queued or removed from the queue (
#7
)
parent
899b6b98
No related branches found
No related tags found
No related merge requests found
Pipeline
#11364
failed
May 27, 2020
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/textswitch.js
+12
-20
12 additions, 20 deletions
src/textswitch.js
src/vpu-qualified-signature-pdf-upload.js
+1
-0
1 addition, 0 deletions
src/vpu-qualified-signature-pdf-upload.js
with
13 additions
and
20 deletions
src/textswitch.js
+
12
−
20
View file @
b57a0721
...
...
@@ -12,7 +12,7 @@ const BUTTON2 = "button2";
* disabled: Disable the switch
*
* Events:
* change:
emitted when the active name changes or the same
button is clicked
again
* change:
when
button is clicked
*
* Example:
* <my-tag name="one" name1="one" name2="two" value1="One", value2="Two"></my-tag>
...
...
@@ -63,22 +63,13 @@ export class TextSwitch extends LitElement {
}
update
(
changedProperties
)
{
this
.
name
=
this
.
_active
===
BUTTON1
?
this
.
name1
:
this
.
name2
;
changedProperties
.
forEach
((
oldValue
,
propName
)
=>
{
if
(
propName
===
"
name
"
)
{
if
(
this
[
propName
]
===
this
.
name1
)
{
this
.
_active
=
BUTTON1
;
}
if
(
this
[
propName
]
===
this
.
name2
)
{
}
else
if
(
this
[
propName
]
===
this
.
name2
)
{
this
.
_active
=
BUTTON2
;
}
}
else
if
(
propName
===
"
_active
"
)
{
const
event
=
new
CustomEvent
(
"
change
"
,
{
bubbles
:
true
,
cancelable
:
false
,
});
this
.
dispatchEvent
(
event
);
}
});
...
...
@@ -87,15 +78,16 @@ export class TextSwitch extends LitElement {
render
()
{
const
onClick
=
function
(
e
)
{
let
new_id
=
e
.
target
.
id
;
if
(
new_id
===
this
.
_active
)
{
this
.
_active
=
e
.
target
.
id
;
this
.
name
=
this
.
_active
===
BUTTON1
?
this
.
name1
:
this
.
name2
;
// send event only when buttons are clicked
const
event
=
new
CustomEvent
(
"
change
"
,
{
bubbles
:
true
,
cancelable
:
false
,
});
this
.
dispatchEvent
(
event
);
}
this
.
_active
=
new_id
;
};
return
html
`
...
...
This diff is collapsed.
Click to expand it.
src/vpu-qualified-signature-pdf-upload.js
+
1
−
0
View file @
b57a0721
...
...
@@ -696,6 +696,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
<span class="headline">
${
i18n
.
t
(
'
qualified-pdf-upload.positioning
'
)}
:</span>
<vpu-textswitch name1="auto"
name2="manual"
name="
${
this
.
queuedFilesPlacementModes
[
id
]
??
"
auto
"
}
"
class="switch"
value1="
${
i18n
.
t
(
'
qualified-pdf-upload.positioning-automatic
'
)}
"
value2="
${
i18n
.
t
(
'
qualified-pdf-upload.positioning-manual
'
)}
"
...
...
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