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
09e29e7a
Commit
09e29e7a
authored
Feb 02, 2024
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts
parent
761c9157
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
70 deletions
+25
-70
.classpath
WebGde/.classpath
+1
-1
org.eclipse.wst.common.project.facet.core.xml
...e/.settings/org.eclipse.wst.common.project.facet.core.xml
+1
-1
config.ini
WebGde/WebContent/WEB-INF/config/config.ini
+2
-2
generateFields.js
...bContent/WebGde-Widgets/DataInputWidget/generateFields.js
+11
-65
submit.js
WebGde/WebContent/WebGde-Widgets/Submit/submit.js
+0
-1
DEV_SCHEMA2.json
.../WebContent/WebGde-Widgets/sample_schema/DEV_SCHEMA2.json
+10
-0
No files found.
WebGde/.classpath
View file @
09e29e7a
...
...
@@ -24,7 +24,7 @@
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"
fish.payara.eclipse.tools.server
.lib.system"
>
<classpathentry
kind=
"con"
path=
"
org.eclipse.payara.tools
.lib.system"
>
<attributes>
<attribute
name=
"owner.project.facets"
value=
"jst.web"
/>
</attributes>
...
...
WebGde/.settings/org.eclipse.wst.common.project.facet.core.xml
View file @
09e29e7a
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime
name=
"Payara"
/>
<runtime
name=
"Payara
Server 5 (5.2022.5)
"
/>
<fixed
facet=
"jst.web"
/>
<fixed
facet=
"java"
/>
<fixed
facet=
"wst.jsdt.web"
/>
...
...
WebGde/WebContent/WEB-INF/config/config.ini
View file @
09e29e7a
...
...
@@ -25,4 +25,4 @@ PASSWORD=p455w0rd
[SSO CONFIG]
PUBKEY
=
C:/Users/jcalub/git/web-ui-479/WebGde/WebContent/WEB-INF/config/sso/pubkey.pem
\ No newline at end of file
PUBKEY
=
C:/Users/oang/git/web-ui-mobile2/WebGde/WebContent/WEB-INF/config/sso/pubkey.pem
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
View file @
09e29e7a
...
...
@@ -1381,23 +1381,14 @@ const inputChecklist = (key, validation, readOnly) => {
};
}
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
=======
}
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
div.appendChild(checkbox);
var label = document.createTextNode(item);
div.appendChild(label);
dropdownContent.appendChild(div);
}
})
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
if(isOther && !readOnly){
=======
if (isOther) {
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
// Create the checkbox dependent on an input text value
var dependentDiv = document.createElement('
div
');
dependentDiv.classList.add('
checkbox
');
...
...
@@ -1506,11 +1497,7 @@ const inputRadiolist = (key, validation, readOnly) => {
dropdownContent.appendChild(radioDiv);
}
});
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
if (isOther && !readOnly){
=======
if (isOther) {
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
// Create the radio button dependent on an input text value
var dependentDiv = document.createElement('
div
');
dependentDiv.classList.add('
radio
-
like
-
checkbox
');
...
...
@@ -1549,12 +1536,8 @@ const inputRadiolist = (key, validation, readOnly) => {
});
}
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
dropdownContent.addEventListener('
change
', function () {
=======
dropdownContent.addEventListener('
change
', function() {
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
const radioButtons = document.getElementsByName(`radioChoices_${key}`);
radioButtons.forEach(radio => {
if (radio.checked) {
...
...
@@ -1622,7 +1605,6 @@ const inputGeoTag = (key, validation) => {
*/
const inputDropdown = (key, validation, readOnly) => {
try {
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
const { mandatory, options } = validation;
const input = document.createElement('
select
');
const errorDiv = document.getElementById(`${key}_error`);
...
...
@@ -1653,47 +1635,20 @@ const inputDropdown = (key, validation, readOnly) => {
for (const option of options) {
const newOption = new Option(option, option, false, false);
input.add(newOption);
=======
const { mandatory, options } = validation;
const input = document.createElement('
select
');
const errorDiv = document.getElementById(`${key}_error`);
input.setAttribute('
id
', `${key}`);
input.setAttribute('
name
', `${key}`);
input.classList.add('
dropdown
-
input
');
$(input).select2();
$(input).on('
select2
:
select
', function(e) {
// Get the selected value
var selectedValue = e.params.data.id;
// Your custom logic when an option is selected
console.log('
Selected
option
:
' + selectedValue);
});
if (options && options.length > 0) {
// Add a placeholder option
const newOption = new Option('
Choose
an
option
', null, false, false);
input.add(newOption);
// Add other options
for (const option of options) {
const newOption = new Option(option, option, false, false);
input.add(newOption);
}
} else {
// Add a disabled option if no options are available
const newOption = new Option('
No
option
available
', null, false, true);
input.add(newOption);
input.setAttribute('
disabled
', '
false
');
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
}
return input;
} else {
// Add a disabled option if no options are available
const newOption = new Option('
No
option
available
', null, false, true);
input.add(newOption);
input.setAttribute('
disabled
', '
false
');
}
return input;
} catch (err) {
throw err;
throw err;
}
};
};
const inputDbLookup = async (key, validation, readOnly) => {
...
...
@@ -1836,14 +1791,9 @@ const deconstruct = async (section, container, classAttribute) => {
const validation = getValidation(key, schema)
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
const { mandatory, collection } = validation;
=======
const { mandatory } = validation;
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
if (hidden) {
const hiddenField = document.createElement('
div
') // will contain input field and label
hiddenField.setAttribute('
class
', '
fieldContainer
' + classAttribute)
...
...
@@ -1984,11 +1934,7 @@ const deconstruct = async (section, container, classAttribute) => {
input.classList.add(classAttribute)
inputContainer.appendChild(input)
<<<<<<< WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
if (hidden && ["geotag", "altitude", "direction"].includes(collection)){
=======
if (hidden && ["geotag", "altitude", "direction"].includes(validation.collection)) {
>>>>>>> WebGde/WebContent/WebGde-Widgets/DataInputWidget/generateFields.js
newField.style.display = '
none
'; // Hide the input
newField.classList.add('
hidden
'); // Add '
hidden
' class
}
...
...
WebGde/WebContent/WebGde-Widgets/Submit/submit.js
View file @
09e29e7a
...
...
@@ -183,7 +183,6 @@ export const submitForm = async (e) => {
export
const
returnForm
=
async
(
e
)
=>
{
try
{
setGlobalEndTime
(
new
Date
().
toLocaleString
());
const
Form
=
document
.
getElementById
(
"fields"
);
const
{
elements
}
=
Form
let
error
=
false
;
...
...
WebGde/WebContent/WebGde-Widgets/sample_schema/DEV_SCHEMA2.json
View file @
09e29e7a
...
...
@@ -89,6 +89,16 @@
"mandatory"
:
false
},
"readOnly"
:
true
},
"Image"
:
{
"fieldLabel"
:
"Image"
,
"aka"
:
"field10"
,
"validation"
:
{
"fieldLength"
:
20.0
,
"collection"
:
"image-capture"
,
"mandatory"
:
false
},
"readOnly"
:
false
}
}
}
...
...
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