Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
WikiEducator
course-snapshot
Commits
81abeeb0
Commit
81abeeb0
authored
Sep 01, 2020
by
Dave Lane
Browse files
tweaks to the H5P links to fix responsive behaviour
parent
596d23da
Changes
1
Hide whitespace changes
Inline
Side-by-side
extras/h5p.js
View file @
81abeeb0
...
...
@@ -49,12 +49,12 @@ module.exports = {
case
'
height
'
:
height
=
$
(
this
).
text
();
console
.
log
(
'
height =
'
+
height
);
style_string
+=
'
height:
'
+
height
+
'
;
'
;
//
style_string += ' height:'+height+';';
break
;
case
'
width
'
:
width
=
$
(
this
).
text
();
console
.
log
(
'
width =
'
+
width
);
style_string
+=
'
width:
'
+
width
+
'
;
'
;
style_string
+=
'
max-
width:
'
+
width
+
'
;
'
;
break
;
case
'
style
'
:
style
=
$
(
this
).
text
();
...
...
@@ -92,10 +92,13 @@ module.exports = {
code
+=
'
data-content-id="
'
+
h5pid
+
'
" src="
'
+
script_url
+
'
/
'
+
h5pid
+
'
/embed"
'
;
if
(
width
!=
""
)
{
code
+=
'
width="
'
+
width
+
'
"
'
;
}
if
(
height
!=
""
)
{
}
else
{
style_string
+=
'
max-width:
'
+
width
+
'
;
'
;
}
/*if (height != "") {
code += ' height="'+height+'"';
}
}
*/
if
(
style_string
!=
""
)
{
code
+=
'
style="
'
+
style_string
+
'
"
'
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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