Fixed problem with empty actionbar [HFP-277]

improved-embed-and-download
Paal Joergensen 2016-12-20 14:37:31 +01:00
parent 87ec43d687
commit 1341768c90
1 changed files with 6 additions and 7 deletions

View File

@ -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();