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
a3b6d4c1
Commit
a3b6d4c1
authored
Feb 02, 2023
by
Jorem Magcawas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update schema handler on doctypes
parent
ae5b8a3f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
28 deletions
+94
-28
.classpath
WebGde/.classpath
+17
-1
.project
WebGde/.project
+11
-0
org.eclipse.jdt.apt.core.prefs
WebGde/.settings/org.eclipse.jdt.apt.core.prefs
+2
-0
org.eclipse.jdt.core.prefs
WebGde/.settings/org.eclipse.jdt.core.prefs
+1
-0
org.eclipse.wst.common.component
WebGde/.settings/org.eclipse.wst.common.component
+14
-5
getFields.js
WebGde/WebContent/src/getFields/getFields.js
+29
-9
tiffViewer.js
WebGde/WebContent/src/tiffViewer/tiffViewer.js
+16
-10
validateSchema.js
WebGde/WebContent/src/validateSchema/validateSchema.js
+4
-3
No files found.
WebGde/.classpath
View file @
a3b6d4c1
...
...
@@ -26,7 +26,23 @@
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"org.eclipse.jst.component.dependency"
value=
"/WEB-INF/lib"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
path=
"target/generated-sources/annotations"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"ignore_optional_problems"
value=
"true"
/>
<attribute
name=
"m2e-apt"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"target/test-classes"
path=
"target/generated-test-sources/test-annotations"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"ignore_optional_problems"
value=
"true"
/>
<attribute
name=
"m2e-apt"
value=
"true"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
...
...
WebGde/.project
View file @
a3b6d4c1
...
...
@@ -34,4 +34,15 @@
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.eclipse.wst.jsdt.core.jsNature
</nature>
</natures>
<filteredResources>
<filter>
<id>
1675315043043
</id>
<name></name>
<type>
30
</type>
<matcher>
<id>
org.eclipse.core.resources.regexFilterMatcher
</id>
<arguments>
node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
WebGde/.settings/org.eclipse.jdt.apt.core.prefs
0 → 100644
View file @
a3b6d4c1
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false
WebGde/.settings/org.eclipse.jdt.core.prefs
View file @
a3b6d4c1
...
...
@@ -7,5 +7,6 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
WebGde/.settings/org.eclipse.wst.common.component
View file @
a3b6d4c1
<?xml version="1.0" encoding="UTF-8"?>
<project-modules
id=
"moduleCoreId"
project-version=
"1.5.0"
>
<wb-module
deploy-name=
"WebGde-0.0.1-SNAPSHOT"
>
<wb-resource
deploy-path=
"/"
source-path=
"/target/m2e-wtp/web-resources"
/>
<wb-resource
deploy-path=
"/"
source-path=
"/target/m2e-wtp/web-resources"
/>
<wb-resource
deploy-path=
"/"
source-path=
"/WebContent"
tag=
"defaultRootSource"
/>
<wb-resource
deploy-path=
"/WEB-INF/classes"
source-path=
"/src/main/java"
/>
<wb-resource
deploy-path=
"/WEB-INF/classes"
source-path=
"/src/main/java"
/>
<wb-resource
deploy-path=
"/WEB-INF/classes"
source-path=
"/target/generated-sources/annotations"
/>
<property
name=
"java-output-path"
value=
"/WebGde/build/classes"
/>
<property
name=
"context-root"
value=
"WebGde"
/>
</wb-module>
</wb-module>
</project-modules>
WebGde/WebContent/src/getFields/getFields.js
View file @
a3b6d4c1
...
...
@@ -27,12 +27,35 @@ const displayFields = async (parentID) => {
clearFields
(
parentID
)
// make sure input fields are clear
await
fetchSchema
()
createDocTypeDropdown
(
'DocType'
,
div
,
schema
)
await
fetchSchema
();
console
.
log
(
schema
);
createDocTypeDropdown
(
'DocType'
,
div
,
schema
)
createSection
(
'Section'
,
div
)
const
{
ACCOUNTING_DOCUMENTS
}
=
schema
Object
.
keys
(
schema
).
forEach
(
function
(
key
)
{
console
.
log
(
key
+
": "
+
schema
[
key
]);
//doctypes in schema
let
doctypes
=
schema
[
key
];
const
{
valid
,
error
}
=
validateSchema
(
key
)
if
(
!
valid
){
div
.
textContent
=
error
div
.
style
.
color
=
'#ff3333'
}
for
(
let
key
in
doctypes
)
{
if
(
doctypes
.
hasOwnProperty
(
key
))
{
console
.
log
(
key
+
": "
+
doctypes
[
key
]);
//sections on doctypes
let
section
=
doctypes
[
key
];
console
.
log
(
section
);
div
=
deconstruct
(
section
,
div
,
key
)
}
}
});
/* const { ACCOUNTING_DOCUMENTS } = schema
//getDocType = DOC_TYPE1 ;
...
...
@@ -49,12 +72,9 @@ const displayFields = async (parentID) => {
const { HR_FILES } = schema
const { SECTION3 } = HR_FILES
div
=
deconstruct
(
SECTION3
,
div
,
'SECTION3'
)
div = deconstruct(SECTION3, div, 'SECTION3')
*/
if
(
!
valid
){
div
.
textContent
=
error
div
.
style
.
color
=
'#ff3333'
}
const
submit
=
document
.
createElement
(
'input'
)
submit
.
type
=
'submit'
...
...
WebGde/WebContent/src/tiffViewer/tiffViewer.js
View file @
a3b6d4c1
...
...
@@ -275,16 +275,20 @@ function TIFFViewer(xhr, TiffViewerImageName) {
} else if (setheight > 800 && setwidth <= 1000) {
img.style = "width: 800;";
changed = true;
} else
{
} else{
img.style = `width: {setwidth}; height: {setheight}`;
changed = true;
}
}
if (changed) {
hpercent = (parseInt(setheight, 10) * (10 / 100));
wpercent = (parseInt(setwidth, 10) * (10 / 100));
setwidth = parseInt(img.style.width, 10);
setheight = parseInt(img.style.height, 10) ;
if(TiffViewer_pages > 1){
hpercent = (parseInt(setheight, 10) * (10 / 100));
wpercent = (parseInt(setwidth, 10) * (10 / 100));
}
setwidth = parseInt(img.style.width, 10);
setheight = parseInt(img.style.height, 10);
document.getElementById("TiffViewer_FitButton").style.display = "inherit";
}
...
...
@@ -308,10 +312,12 @@ function TIFFViewer(xhr, TiffViewerImageName) {
}
}
for (var j = 1; j <= TiffViewer_pages; j++) {
var img = document.getElementById("IMG" + j).style.display = "none";
}
if(TiffViewer_pages > 1){
for (var j = 1; j <= TiffViewer_pages; j++) {
var img = document.getElementById("IMG" + j).style.display = "none";
}
}
//getting the metadata of each TIFF page
function getMeta(url, callback) {
var img = new Image();
...
...
WebGde/WebContent/src/validateSchema/validateSchema.js
View file @
a3b6d4c1
const
validateSchema
=
()
=>
{
const
{
ACCOUNTING_DOCUMENTS
}
=
schema
const
validateSchema
=
(
doctype
)
=>
{
const
validate
=
schema
[
doctype
]
if
(
!
ACCOUNTING_DOCUMENTS
)
return
{
valid
:
false
,
error
:
'SECTION is missing!'
}
if
(
!
validate
)
return
{
valid
:
false
,
error
:
'SECTION is missing!'
}
return
{
valid
:
true
}
}
\ No newline at end of file
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