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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
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.
...
@@ -39,9 +39,8 @@ Creates the Book header.
var
y
=
document
.
getElementsByClassName
(
x
[
i
]);
var
y
=
document
.
getElementsByClassName
(
x
[
i
]);
for
(
var
j
=
0
;
j
<
y
.
length
;
++
j
)
y
[
j
].
textContent
=
vars
[
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
)
{
function
setImageSize
(
pic
)
{
var
pic
=
z
[
k
];
if
(
pic
.
naturalWidth
/
pic
.
naturalHeight
<=
1
)
{
if
(
pic
.
naturalWidth
/
pic
.
naturalHeight
<=
1
)
{
pic
.
style
.
width
=
"
auto
"
;
pic
.
style
.
width
=
"
auto
"
;
pic
.
style
.
maxWidth
=
"
28mm
"
;
pic
.
style
.
maxWidth
=
"
28mm
"
;
...
@@ -49,7 +48,6 @@ Creates the Book header.
...
@@ -49,7 +48,6 @@ Creates the Book header.
pic
.
style
.
height
=
"
auto
"
;
pic
.
style
.
height
=
"
auto
"
;
}
}
}
}
}
</script>
</script>
</head>
</head>
<body
class=
"ci-book"
onload=
"setPlaceholdersWithUrlParameters()"
>
<body
class=
"ci-book"
onload=
"setPlaceholdersWithUrlParameters()"
>
...
@@ -65,7 +63,7 @@ Creates the Book header.
...
@@ -65,7 +63,7 @@ Creates the Book header.
<tr>
<tr>
<td>
<td>
<div
class=
"ci-book-header-image-wkhtmltopdf-image-wrapper"
>
<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>
</div>
</td>
</td>
<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