Move H5P content to top of body
parent
2187777720
commit
6f46c5a5fa
|
@ -117,7 +117,7 @@ interface H5PFrameworkInterface {
|
||||||
* @param object $libraryData
|
* @param object $libraryData
|
||||||
* Object holding the information that is to be stored
|
* Object holding the information that is to be stored
|
||||||
*/
|
*/
|
||||||
public function saveLibraryData(&$libraryData);
|
public function saveLibraryData(&$libraryData, $new = TRUE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores contentData
|
* Stores contentData
|
||||||
|
|
|
@ -63,9 +63,15 @@ H5P.fullScreen = function ($el, obj) {
|
||||||
if (H5P.fullScreenBrowserPrefix === undefined) {
|
if (H5P.fullScreenBrowserPrefix === undefined) {
|
||||||
// Create semi fullscreen.
|
// Create semi fullscreen.
|
||||||
$el.add(H5P.$body).addClass('h5p-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('<div id="h5pfullscreenreplacementplaceholder"></div>').prependTo(H5P.$body);
|
||||||
|
|
||||||
var $disable = H5P.jQuery('<a href="#" class="h5p-disable-fullscreen">Disable fullscreen</a>').appendTo($el);
|
var $disable = H5P.jQuery('<a href="#" class="h5p-disable-fullscreen">Disable fullscreen</a>').appendTo($el);
|
||||||
var keyup, disableSemiFullscreen = function () {
|
var keyup, disableSemiFullscreen = function () {
|
||||||
$el.add(H5P.$body).removeClass('h5p-semi-fullscreen');
|
$el.add(H5P.$body).removeClass('h5p-semi-fullscreen');
|
||||||
|
$('#h5pfullscreenreplacementplaceholder').before($el).remove();
|
||||||
$disable.remove();
|
$disable.remove();
|
||||||
H5P.$body.unbind('keyup', keyup);
|
H5P.$body.unbind('keyup', keyup);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue