Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
e6e14440
Commit
e6e14440
authored
Jul 29, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: wait for image to be loaded
otherwise naturalWidth/naturalHeight may be 0
parent
e9b98429
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBookHeader.zpt
...kins/erp5_corporate_identity/WebPage_createBookHeader.zpt
+8
-10
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBookHeader.zpt
View file @
e6e14440
...
...
@@ -39,9 +39,8 @@ Creates the Book header.
var
y
=
document
.
getElementsByClassName
(
x
[
i
]);
for
(
var
j
=
0
;
j
<
y
.
length
;
++
j
)
y
[
j
].
textContent
=
vars
[
x
[
i
]];
}
var
z
=
document
.
getElementsByClassName
(
"
hack
"
);
for
(
var
k
=
0
;
k
<
z
.
length
;
++
k
)
{
var
pic
=
z
[
k
];
}
function
setImageSize
(
pic
)
{
if
(
pic
.
naturalWidth
/
pic
.
naturalHeight
<=
1
)
{
pic
.
style
.
width
=
"
auto
"
;
pic
.
style
.
maxWidth
=
"
28mm
"
;
...
...
@@ -49,7 +48,6 @@ Creates the Book header.
pic
.
style
.
height
=
"
auto
"
;
}
}
}
</script>
</head>
<body
class=
"ci-book"
onload=
"setPlaceholdersWithUrlParameters()"
>
...
...
@@ -65,7 +63,7 @@ Creates the Book header.
<tr>
<td>
<div
class=
"ci-book-header-image-wkhtmltopdf-image-wrapper"
>
<img
class=
"hack"
tal:attributes=
"src python: book_logo_url; alt python: book_logo_title"
/>
<img
class=
"hack"
onload=
"setImageSize(event.srcElement)"
tal:attributes=
"src python: book_logo_url; alt python: book_logo_title"
/>
</div>
</td>
<td>
...
...
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