Commit 413d1ee2 by Owen Ryan Ang

changed behavior for when opening keyboard, added new schema

parent 4a0f6327
......@@ -24,4 +24,4 @@ USERNAME=root
PASSWORD=p455w0rd
[SSO CONFIG]
PUBKEY = C:/Users/oang/git/web-ui-mobile1/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
//Data Input Field Config
export var SCHEMA_FILE_PATH = "./WebGde-Widgets/sample_schema/dev_schema_childof.json";
export var SCHEMA_FILE_PATH = "./WebGde-Widgets/sample_schema/REG-INP.json";
//DBLookup Webservice URL
export var DB_URL = "http://localhost:8080/WebGde/svc/gfs-rest/db-lookup"
\ No newline at end of file
......@@ -1766,10 +1766,21 @@ const deconstruct = async (section, container, classAttribute) => {
inputContainer.setAttribute('class', 'inputContainer ' + classAttribute)
hiddenField.appendChild(inputContainer)
// default hiddeninputs to String
const hiddenInput = inputHidden(key, schema);
hiddenInput.setAttribute('class', classAttribute)
inputContainer.appendChild(hiddenInput);
switch (validation.collection) {
case "geotag":
case "altitude":
case "direction":
const hiddenInputGeo = inputGeoTag(key, validation);
hiddenInputGeo.setAttribute('class', classAttribute);
inputContainer.appendChild(hiddenInputGeo);
break;
default:
const hiddenInputDefault = inputHidden(key, validation);
hiddenInputDefault.setAttribute('class', classAttribute);
inputContainer.appendChild(hiddenInputDefault);
break;
}
hiddenField.style.display = 'none'; // Hide the input
hiddenField.classList.add('hidden'); // Add 'hidden' class
......@@ -1871,6 +1882,11 @@ const deconstruct = async (section, container, classAttribute) => {
input.classList.add(classAttribute)
inputContainer.appendChild(input)
if (hidden && ["geotag", "altitude", "direction"].includes(validation.collection)){
newField.style.display = 'none'; // Hide the input
newField.classList.add('hidden'); // Add 'hidden' class
}
}
//keys na drop down
......
export const PROJECT_CODE = "PROJCODE01";
export const PROJECT_CODE = "DSQC";
export const ENCODING_PASS = "PASS1";
export const GFS_URL = "http://107.20.193.188/gfs-explorer-ws/svc/gfs-rest/";
......
......@@ -32,7 +32,7 @@ export const NEXT_NODE = "Complete"
export const EXCEPTION_NODE = "Exception"
export const SHOW_ELEMENT_LIST_VIEWER = "Y"
export const ADD_NEW_OPTION = "N"
export const DISPLAYED_DETAILS = "Address|Cassandra_Key|GFS_Loc" //pipe-delimited
export const DISPLAYED_DETAILS = "Address|Cassandra_Key" //pipe-delimited
export const PDF_EXTENSION = ".pdf"
export const JPG_EXTENSION = ".jpg"
......
......@@ -56,15 +56,24 @@ export class DocumentControlWidget {
addEvenListeners() {
// Get the initial window height and store it in session storage
const initialWindowHeight = window.innerHeight;
sessionStorage.setItem('initialWindowHeight', initialWindowHeight);
// Add an event listener for the resize event
window.addEventListener("resize", (e) => {
const container = this.global.container;
if (container.style.display === "none") {
container.style.display = "flex";
// Get the stored initial window height from session storage
const storedHeight = sessionStorage.getItem('initialWindowHeight');
// Check if the current window height matches the stored height
if (window.innerHeight !== parseInt(storedHeight)) {
container.style.display = "none"; // Hide container when heights don't match
} else {
container.style.display = "none";
container.style.display = "flex"; // Show container when heights match
}
})
});
this.global.submitBtn.onclick = async (e) => {
createSubmitWindow(e);
......
......@@ -118,7 +118,8 @@
"fieldLength" : 58.0,
"collection" : "geotag",
"mandatory" : false
}
},
"hidden" : true
},
"patient_image" : {
"fieldLabel" : "Patient Image",
......
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