Commit 09e29e7a by Owen Ryan Ang

Resolve conflicts

parent 761c9157
......@@ -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>
......
<?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"/>
......
......@@ -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
......@@ -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;
} catch (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
}
......
......@@ -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;
......
......@@ -89,6 +89,16 @@
"mandatory" : false
},
"readOnly" : true
},
"Image" : {
"fieldLabel" : "Image",
"aka" : "field10",
"validation" : {
"fieldLength" : 20.0,
"collection" : "image-capture",
"mandatory" : false
},
"readOnly" : false
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment