From 6f46c5a5fa809fbbd6f4e2a2e06d435441291a45 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Tue, 10 Sep 2013 22:43:31 +0200 Subject: [PATCH] Move H5P content to top of body --- h5p.classes.php | 2 +- js/h5p.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index f86f8e0..b5e5025 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -117,7 +117,7 @@ interface H5PFrameworkInterface { * @param object $libraryData * Object holding the information that is to be stored */ - public function saveLibraryData(&$libraryData); + public function saveLibraryData(&$libraryData, $new = TRUE); /** * Stores contentData diff --git a/js/h5p.js b/js/h5p.js index 8dfbf19..0bb48c7 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -63,9 +63,15 @@ H5P.fullScreen = function ($el, obj) { if (H5P.fullScreenBrowserPrefix === undefined) { // Create semi fullscreen. $el.add(H5P.$body).addClass('h5p-semi-fullscreen'); + // Move H5P content to top of body to make sure it is above other page + // content. Insert placeholder in original position to be able to move it + // back. + $el.after('
').prependTo(H5P.$body); + var $disable = H5P.jQuery('Disable fullscreen').appendTo($el); var keyup, disableSemiFullscreen = function () { $el.add(H5P.$body).removeClass('h5p-semi-fullscreen'); + $('#h5pfullscreenreplacementplaceholder').before($el).remove(); $disable.remove(); H5P.$body.unbind('keyup', keyup);