Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WEBGDE-Components
web-ui
Commits
0f97c7f1
Commit
0f97c7f1
authored
Oct 19, 2023
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image capture validation bug fix
parent
f45a70f2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
3 deletions
+40
-3
captureFingerprint.js
.../DataInputWidget/FingerprintCapture/captureFingerprint.js
+1
-0
captureImage.js
...bGde-Widgets/DataInputWidget/ImageCapture/captureImage.js
+1
-0
captureVideo.js
...bGde-Widgets/DataInputWidget/VideoCapture/captureVideo.js
+1
-0
generateFields.js
...bContent/WebGde-Widgets/DataInputWidget/generateFields.js
+33
-0
validateInput.js
...ebContent/WebGde-Widgets/DataInputWidget/validateInput.js
+2
-1
config.js
WebGde/WebContent/WebGde-Widgets/config.js
+2
-2
No files found.
WebGde/WebContent/WebGde-Widgets/DataInputWidget/FingerprintCapture/captureFingerprint.js
View file @
0f97c7f1
...
...
@@ -42,6 +42,7 @@ export function processFingerprint(key, filename) {
thumb
.
style
.
display
=
'none'
;
x
.
style
.
display
=
'none'
;
filenameElement
.
style
.
display
=
'none'
;
filenameElement
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
WebGde/WebContent/WebGde-Widgets/DataInputWidget/ImageCapture/captureImage.js
View file @
0f97c7f1
...
...
@@ -43,6 +43,7 @@ export function processCapture(key, imgFilename) {
thumb
.
style
.
display
=
'none'
;
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
WebGde/WebContent/WebGde-Widgets/DataInputWidget/VideoCapture/captureVideo.js
View file @
0f97c7f1
...
...
@@ -39,6 +39,7 @@ export function processVideoCapture(key, videoFilename){
thumb
.
style
.
display
=
'none'
;
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
View file @
0f97c7f1
...
...
@@ -546,6 +546,7 @@ const inputImageCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
input
.
value
=
''
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
@@ -581,6 +582,7 @@ const inputImageCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
input
.
value
=
''
...
...
@@ -634,6 +636,12 @@ const inputImageCapture = (key, validation) => {
img
.
setAttribute
(
'id'
,
`
${
key
}
_zz`
);
img
.
setAttribute
(
'style'
,
'display: none'
);
img
.
addEventListener
(
'load'
,
function
()
{
// Image loaded successfully, handle it as valid
// You can add your logic to handle a valid image here
container2
.
classList
.
remove
(
'input-invalid'
);
container2
.
classList
.
add
(
'input-valid'
);
});
const
filename
=
document
.
createElement
(
'span'
);
filename
.
setAttribute
(
'id'
,
`
${
key
}
_fname`
);
...
...
@@ -751,6 +759,7 @@ const inputVideoCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
input
.
value
=
''
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
@@ -786,6 +795,7 @@ const inputVideoCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
input
.
value
=
''
...
...
@@ -839,6 +849,12 @@ const inputVideoCapture = (key, validation) => {
img
.
setAttribute
(
'id'
,
`
${
key
}
_zz`
);
img
.
setAttribute
(
'style'
,
'display: none'
);
img
.
addEventListener
(
'load'
,
function
()
{
// Image loaded successfully, handle it as valid
// You can add your logic to handle a valid image here
container2
.
classList
.
remove
(
'input-invalid'
);
container2
.
classList
.
add
(
'input-valid'
);
});
const
filename
=
document
.
createElement
(
'span'
);
filename
.
setAttribute
(
'id'
,
`
${
key
}
_fname`
);
...
...
@@ -956,6 +972,7 @@ const inputFingerprintCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
input
.
value
=
''
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
@@ -991,6 +1008,7 @@ const inputFingerprintCapture = (key, validation) => {
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
input
.
value
=
''
...
...
@@ -1030,6 +1048,12 @@ const inputFingerprintCapture = (key, validation) => {
img
.
setAttribute
(
'id'
,
`
${
key
}
_zz`
);
img
.
setAttribute
(
'style'
,
'display: none'
);
img
.
addEventListener
(
'load'
,
function
()
{
// Image loaded successfully, handle it as valid
// You can add your logic to handle a valid image here
container2
.
classList
.
remove
(
'input-invalid'
);
container2
.
classList
.
add
(
'input-valid'
);
});
const
filename
=
document
.
createElement
(
'span'
);
filename
.
setAttribute
(
'id'
,
`
${
key
}
_fname`
);
...
...
@@ -1239,6 +1263,7 @@ const inputFileUpload = (key, validation) => {
x
.
style
.
display
=
'none'
;
input
.
value
=
''
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
// Clear the hidden fields
...
...
@@ -1276,6 +1301,7 @@ const inputFileUpload = (key, validation) => {
x
.
style
.
display
=
'none'
;
filename
.
style
.
display
=
'none'
;
filename
.
textContent
=
''
;
document
.
getElementById
(
`
${
key
}
_buttonsContainer-video`
).
style
.
display
=
'flex'
;
input
.
value
=
''
...
...
@@ -1309,6 +1335,7 @@ const inputFileUpload = (key, validation) => {
// Remove the file on '
x
' click
document.getElementById(`${key}_x`).addEventListener('
click
', () => {
filename.style.display = '
none
';
filename.textContent = '';
document.getElementById(`${key}_buttonsContainer-video`).style.display = '
flex
';
input.value = '';
x.style.display = '
none
';
...
...
@@ -1345,6 +1372,12 @@ const inputFileUpload = (key, validation) => {
img.setAttribute('
id
', `${key}_zz`);
img.setAttribute('
style
', '
display
:
none
');
img.addEventListener('
load
', function() {
// Image loaded successfully, handle it as valid
// You can add your logic to handle a valid image here
container2.classList.remove('
input
-
invalid
');
container2.classList.add('
input
-
valid
');
});
const filename = document.createElement('
span
');
filename.setAttribute('
id
', `${key}_fname`);
...
...
WebGde/WebContent/WebGde-Widgets/DataInputWidget/validateInput.js
View file @
0f97c7f1
...
...
@@ -304,7 +304,8 @@ const validateMedia = (validation, fieldID) => {
const
{
mandatory
}
=
validation
const
inputElement
=
document
.
getElementById
(
`
${
fieldID
}
_attachedMedia`
);
if
(
mandatory
&&
inputElement
.
files
.
length
===
0
)
{
const
inputFilename
=
document
.
getElementById
(
`
${
fieldID
}
_fname`
);
if
(
mandatory
&&
inputElement
.
files
.
length
===
0
&&
inputFilename
.
textContent
.
trim
()
===
''
)
{
errors
=
[...
errors
,
'No File Attached!'
]
}
return
{
...
...
WebGde/WebContent/WebGde-Widgets/config.js
View file @
0f97c7f1
...
...
@@ -21,7 +21,7 @@ export const IS_RETRIEVE_FROM_GFS = "N"
export
const
INVALID_KEYS
=
"F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,PrintScreen,ScrollLock,Pause,PageUp,PageDown,Insert,Delete,Control"
//BPO CONFIG
export
const
IS_RETRIEVE_FROM_BPO
=
"
Y
"
export
const
IS_RETRIEVE_FROM_BPO
=
"
N
"
// export const BPO_URL = "http://35.171.20.94:8080/bpo-sqa/"
// export const CURRENT_NODE = "Web GDE"
export
let
BPO_URL
=
DOMAIN
+
"bpo/"
;
...
...
@@ -30,7 +30,7 @@ export let CURRENT_NODE = ""
export
const
ENCODING_PASS
=
"PASS1"
export
const
NEXT_NODE
=
"Complete"
export
const
EXCEPTION_NODE
=
"Exception"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"
Y
"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"
N
"
export
const
ADD_NEW_OPTION
=
"N"
export
const
PDF_EXTENSION
=
".pdf"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment