Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchParapheur
Commits
4364272f
Commit
4364272f
authored
3 years ago
by
Hamza HRAMCHI
Browse files
Options
Downloads
Patches
Plain Diff
FIX #18718 TIME 0:10 fix undefined path in firefox browser
parent
669ad984
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/signatures/signatures.component.html
+2
-2
2 additions, 2 deletions
src/frontend/app/signatures/signatures.component.html
src/frontend/app/signatures/signatures.component.ts
+2
-9
2 additions, 9 deletions
src/frontend/app/signatures/signatures.component.ts
with
4 additions
and
11 deletions
src/frontend/app/signatures/signatures.component.html
+
2
−
2
View file @
4364272f
...
...
@@ -14,12 +14,12 @@
<ion-slide
*ngFor=
"let slide of signaturesList;"
style=
"display: grid;grid-template-columns: repeat(2, 1fr);"
>
<div
style=
"display: contents;"
>
<ion-card
*ngFor=
"let sign of slide; let i=index"
class=
"sign-image"
>
<img
id=
"imgSign_{{i}}"
(click)=
"
setSignatureWidth($event);
selectSignature(sign)"
[src]=
"sanitization.bypassSecurityTrustUrl('data:image/png;base64,' + sign.encodedSignature)"
<img
id=
"imgSign_{{i}}"
(click)=
"selectSignature(sign)"
[src]=
"sanitization.bypassSecurityTrustUrl('data:image/png;base64,' + sign.encodedSignature)"
style=
"width: 190px;cursor: pointer;"
>
<ion-toolbar
style=
"position: absolute;top: 0px;"
>
<ion-label
color=
"secondary"
*ngIf=
"sign.substituted"
>
{{'lang.substitutedSignature' | translate}}
</ion-label>
<ion-buttons
slot=
"start"
>
<ion-button
size=
"small"
color=
"primary"
(click)=
"
setSignatureWidth($event, sign);
selectSignature(sign);"
[title]=
"'lang.selectSignature' | translate"
>
<ion-button
size=
"small"
color=
"primary"
(click)=
"selectSignature(sign);"
[title]=
"'lang.selectSignature' | translate"
>
<ion-icon
slot=
"icon-only"
name=
"arrow-up-circle-outline"
></ion-icon>
</ion-button>
</ion-buttons>
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/signatures/signatures.component.ts
+
2
−
9
View file @
4364272f
...
...
@@ -121,6 +121,8 @@ export class SignaturesComponent implements OnInit {
}
selectSignature
(
signature
:
any
)
{
const
sign
:
any
=
document
.
getElementById
(
'
imgSign_
'
+
(
this
.
signaturesList
[
0
].
indexOf
(
signature
)).
toString
());
this
.
signatureWidth
=
sign
.
naturalWidth
;
let
percentWidth
:
any
=
25
;
this
.
signatureScaling
=
this
.
authService
.
user
.
preferences
.
signatureScaling
===
undefined
?
false
:
this
.
authService
.
user
.
preferences
.
signatureScaling
;
const
signatureWidth
:
number
=
this
.
signatureWidth
>=
this
.
documentWidth
?
100
:
(
this
.
signatureWidth
*
100
)
/
this
.
documentWidth
;
...
...
@@ -340,13 +342,4 @@ export class SignaturesComponent implements OnInit {
const
dataView
=
new
DataView
(
uint8
.
buffer
);
this
.
documentWidth
=
dataView
.
getInt32
(
0
);
}
setSignatureWidth
(
event
:
any
,
sign
:
any
=
null
)
{
if
(
sign
!==
null
)
{
const
element
:
any
=
document
.
getElementById
(
'
imgSign_
'
+
(
this
.
signaturesList
[
0
].
indexOf
(
sign
)).
toString
());
this
.
signatureWidth
=
element
.
naturalWidth
;
}
else
{
this
.
signatureWidth
=
event
.
path
[
0
].
naturalWidth
;
}
}
}
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