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
408f4565
Commit
408f4565
authored
Jul 04, 2023
by
Lynette Lizardo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix next/previous page error
parent
ff716e00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
7 deletions
+18
-7
imageDocument.js
...ts/ImageViewerWidget/modules/imageViewer/imageDocument.js
+7
-2
imageViewer.js
...gets/ImageViewerWidget/modules/imageViewer/imageViewer.js
+0
-0
pdfDocument.js
...gets/ImageViewerWidget/modules/imageViewer/pdfDocument.js
+4
-1
tiffDocument.js
...ets/ImageViewerWidget/modules/imageViewer/tiffDocument.js
+1
-0
config.js
WebGde/WebContent/WebGde-Widgets/config.js
+3
-3
script.js
WebGde/WebContent/WebGde-Widgets/script.js
+3
-1
script.js
WebGde/WebContent/script.js
+0
-0
No files found.
WebGde/WebContent/WebGde-Widgets/ImageViewerWidget/modules/imageViewer/imageDocument.js
View file @
408f4565
...
...
@@ -5,6 +5,7 @@ export class ImageDocument {
imageID
=
null
;
imageType
=
null
;
imageStatus
=
null
;
imageFileName
=
null
;
/*@param
imageFile --- image Blob
...
...
@@ -12,11 +13,12 @@ export class ImageDocument {
fileFormat --- attribute for the element
imageStatus --- 200 to display image, 415 for unsupported file , 500 for unable to display image
*/
constructor
(
imageFile
,
id
,
fileFormat
,
imageStatus
)
{
constructor
(
imageFile
,
id
,
file
Name
,
file
Format
,
imageStatus
)
{
this
.
imageFile
=
imageFile
;
this
.
imageID
=
id
;
this
.
imageType
=
fileFormat
;
this
.
imageStatus
=
imageStatus
;
this
.
imageFileName
=
fileName
;
}
async
init
()
{
...
...
@@ -27,6 +29,7 @@ export class ImageDocument {
imageContainer
.
setAttribute
(
"id"
,
this
.
imageID
);
imageContainer
.
setAttribute
(
"num-of-pages"
,
"1"
);
imageContainer
.
setAttribute
(
"file-type"
,
this
.
imageType
);
imageContainer
.
setAttribute
(
"file-name"
,
this
.
imageFileName
);
let
imageElement
=
document
.
createElement
(
"img"
);
imageElement
.
setAttribute
(
"class"
,
"image"
);
...
...
@@ -47,6 +50,7 @@ export class ImageDocument {
container
.
setAttribute
(
"id"
,
id
);
container
.
setAttribute
(
"num-of-pages"
,
"1"
);
container
.
setAttribute
(
"file-type"
,
format
);
container
.
setAttribute
(
"file-name"
,
this
.
imageFileName
);
let
imageElement
=
document
.
createElement
(
"img"
);
imageElement
.
setAttribute
(
"class"
,
"image unsupported-file"
);
...
...
@@ -66,7 +70,8 @@ export class ImageDocument {
container
.
setAttribute
(
"id"
,
id
);
container
.
setAttribute
(
"num-of-pages"
,
"1"
);
container
.
setAttribute
(
"file-type"
,
""
);
container
.
setAttribute
(
"file-name"
,
this
.
imageFileName
);
let
imageElement
=
document
.
createElement
(
"img"
);
imageElement
.
setAttribute
(
"class"
,
"image error-image"
);
imageElement
.
src
=
"."
+
FOLDER_PATH
+
"/resources/error.png"
;
...
...
WebGde/WebContent/WebGde-Widgets/ImageViewerWidget/modules/imageViewer/imageViewer.js
View file @
408f4565
This diff is collapsed.
Click to expand it.
WebGde/WebContent/WebGde-Widgets/ImageViewerWidget/modules/imageViewer/pdfDocument.js
View file @
408f4565
...
...
@@ -9,11 +9,13 @@ export class PDFDocument {
ctx
=
null
;
imageURL
=
null
;
pdfContainerID
=
null
;
fileName
=
null
;
constructor
(
url
,
id
){
constructor
(
url
,
id
,
fileName
){
this
.
imageURL
=
url
;
this
.
pdfContainerID
=
id
;
this
.
fileName
=
fileName
;
}
async
init
()
{
let
_this
=
this
;
...
...
@@ -43,6 +45,7 @@ export class PDFDocument {
pdfCanvas
.
setAttribute
(
"num-of-pages"
,
_this
.
pdfDoc
.
numPages
);
pdfCanvas
.
setAttribute
(
"file-type"
,
"pdf"
);
_this
.
setPDFDoc
(
_this
.
pdfDoc
);
pdfCanvas
.
setAttribute
(
"file-name"
,
_this
.
fileName
);
// sessionStorage.setItem("current_page", 1);
// sessionStorage.setItem("total_pages", _this.pdfDoc.numPages);
});
...
...
WebGde/WebContent/WebGde-Widgets/ImageViewerWidget/modules/imageViewer/tiffDocument.js
View file @
408f4565
...
...
@@ -43,6 +43,7 @@ export class TiffDocument{
tiffContainer
.
setAttribute
(
"id"
,
this
.
tiffID
);
tiffContainer
.
setAttribute
(
"num-of-pages"
,
TiffViewer_pages
);
tiffContainer
.
setAttribute
(
"file-type"
,
"tiff"
);
tiffContainer
.
setAttribute
(
"file-name"
,
this
.
tiffImageName
);
//creating blank image containers for each page and setting TIFF data as image source
for
(
var
i
=
1
;
i
<=
TiffViewer_pages
;
i
++
)
{
...
...
WebGde/WebContent/WebGde-Widgets/config.js
View file @
408f4565
...
...
@@ -38,9 +38,9 @@ export const HIGH_LIGHT_SCHEMA = "./WebGde-Widgets/sample_schema/dbSchema_anno.
export
const
ROOT_FOLDER
=
"/WebGde-Widgets"
;
//this determines if the images will be retrieved from the gfs
export
const
DOMAIN
=
"http://
184.73.93.160
:8080"
export
const
DOMAIN
=
"http://
54.173.201.199
:8080"
export
const
CONTEXTROOT
=
"gfs-explorer-ws"
export
const
GFS_URL
=
"http://
184.73.93.160
:8080"
+
"/WebGde/svc/gfs-rest"
export
const
GFS_URL
=
"http://
54.173.201.199
:8080"
+
"/WebGde/svc/gfs-rest"
export
const
FOLDER_URL
=
DOMAIN
+
"/"
+
CONTEXTROOT
+
"/svc/gfs-rest/get-folder?parentPath=/Users/"
export
const
DOWNLOAD_URL
=
DOMAIN
+
"/"
+
CONTEXTROOT
+
"/svc/gfs-rest/get-download-link"
export
const
IS_RETRIEVE_FROM_GFS
=
"N"
...
...
@@ -51,7 +51,7 @@ export const INVALID_KEYS = "F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,PrintScreen
export
const
IS_RETRIEVE_FROM_BPO
=
"Y"
// export const BPO_URL = "http://35.171.20.94:8080/bpo-sqa/"
// export const CURRENT_NODE = "Web GDE"
export
const
BPO_URL
=
"http://
184.73.93.160
:8080/bpo/"
export
const
BPO_URL
=
"http://
54.173.201.199
:8080/bpo/"
export
const
CURRENT_NODE
=
"Web_GDE_DEV"
export
const
ENCODING_PASS
=
"PASS1"
export
const
NEXT_NODE
=
"Complete"
...
...
WebGde/WebContent/WebGde-Widgets/script.js
View file @
408f4565
...
...
@@ -48,8 +48,9 @@ async function initializeWebGDE(){
if
(
maxImagesToStore
>
1
){
const
url
=
urls
[
0
];
let
filename
=
url
.
split
(
'/'
).
pop
();
let
imageBlob
=
await
INDEXED_DB_STORAGE
.
getStoreFile
(
"imageNum_
1
"
);
let
imageBlob
=
await
INDEXED_DB_STORAGE
.
getStoreFile
(
"imageNum_
0
"
);
await
IMAGE_VIEWER_OBJECT
.
createCurrentImage
(
filename
.
split
(
"."
).
pop
(),
filename
,
imageBlob
);
sessionStorage
.
setItem
(
"current_page"
,
1
);
const
nextUrl
=
urls
[
1
];
let
nextFilename
=
nextUrl
.
split
(
'/'
).
pop
();
...
...
@@ -60,6 +61,7 @@ async function initializeWebGDE(){
let
filename
=
url
.
split
(
'/'
).
pop
();
let
imageBlob
=
await
INDEXED_DB_STORAGE
.
getStoreFile
(
"imageNum_0"
);
await
IMAGE_VIEWER_OBJECT
.
addImage
(
"currentImage"
,
filename
.
split
(
"."
).
pop
(),
filename
,
imageBlob
);
sessionStorage
.
setItem
(
"current_page"
,
1
);
}
HIGHLIGHT_OBJECT
=
new
Highlight
(
"imageContainer"
,
"currentImage"
,
HIGH_LIGHT_SCHEMA
)
...
...
WebGde/WebContent/script.js
View file @
408f4565
This diff is collapsed.
Click to expand it.
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