Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
weblab
portlets
document-viewer
Commits
24c105b3
Commit
24c105b3
authored
Aug 28, 2019
by
Fred LANGLOIS
Browse files
#22
Asking for translation on a multi-page document can cause a bug
parent
b55f7643
Pipeline
#6268
passed with stages
in 2 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
document-viewer-portlet/src/main/java/org/ow2/weblab/portlet/controller/DocumentViewerController.java
View file @
24c105b3
...
...
@@ -1058,8 +1058,10 @@ public class DocumentViewerController {
// update original resource
if
((!
model
.
containsKey
(
Constants
.
IS_TRANSLATION
)
||
!((
Boolean
)
model
.
get
(
Constants
.
IS_TRANSLATION
)).
booleanValue
())
&&
(!
model
.
containsKey
(
Constants
.
IS_SOURCE
)
||
!((
Boolean
)
model
.
get
(
Constants
.
IS_SOURCE
)).
booleanValue
()))
{
model
.
addAttribute
(
Constants
.
ORIGINAL_RESOURCE
,
model
.
get
(
Constants
.
RESOURCE
));
//update ORIGINAL_RESOURCE only on load of the first page of document
if
(
pageNumber
==
1
)
{
model
.
addAttribute
(
Constants
.
ORIGINAL_RESOURCE
,
model
.
get
(
Constants
.
RESOURCE
));
}
model
.
addAttribute
(
Constants
.
ORIGINAL_SEMANTIC_RESOURCE
,
new
SemanticResource
((
Document
)
model
.
get
(
Constants
.
ORIGINAL_RESOURCE
)));
...
...
Write
Preview
Supports
Markdown
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