Fixed problem with empty actionbar [HFP-277]
parent
87ec43d687
commit
1341768c90
13
js/h5p.js
13
js/h5p.js
|
@ -133,6 +133,7 @@ H5P.init = function (target) {
|
||||||
* Create action bar
|
* Create action bar
|
||||||
*/
|
*/
|
||||||
var displayOptions = contentData.displayOptions;
|
var displayOptions = contentData.displayOptions;
|
||||||
|
var displayFrame = false;
|
||||||
if (displayOptions.frame) {
|
if (displayOptions.frame) {
|
||||||
// Special handling of copyrights
|
// Special handling of copyrights
|
||||||
if (displayOptions.copyright) {
|
if (displayOptions.copyright) {
|
||||||
|
@ -160,15 +161,13 @@ H5P.init = function (target) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$actions.insertAfter($container);
|
if (actionBar.hasActions()) {
|
||||||
|
displayFrame = true;
|
||||||
|
$actions.insertAfter($container);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayOptions.frame && actionBar.hasActions()) {
|
$element.addClass(displayFrame ? 'h5p-frame' : 'h5p-no-frame');
|
||||||
$element.addClass('h5p-frame');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$element.addClass('h5p-no-frame');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep track of when we started
|
// Keep track of when we started
|
||||||
H5P.opened[contentId] = new Date();
|
H5P.opened[contentId] = new Date();
|
||||||
|
|
Loading…
Reference in New Issue