From 676edc5eecb7a1c2487c9f3a3ea7c608d3e11a4c Mon Sep 17 00:00:00 2001 From: Frank Ronny Larsen Date: Tue, 13 Aug 2013 14:16:56 +0200 Subject: [PATCH 1/3] BUGFIX: The saveLibraryData method is assumed to have a argument, include in Interface --- h5p.classes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 97c7064..c0cd835 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -107,8 +107,10 @@ interface H5PFrameworkInterface { * * @param object $libraryData * Object holding the information that is to be stored + * + * @todo Describe object structure and members so new implementors know what to look for */ - public function saveLibraryData(&$libraryData); + public function saveLibraryData(&$libraryData, $new = TRUE); /** * Stores contentData From 89caf91f7d8f92d75ab5ed36d14edd6309d19629 Mon Sep 17 00:00:00 2001 From: Frank Ronny Larsen Date: Tue, 13 Aug 2013 14:17:23 +0200 Subject: [PATCH 2/3] BUGFIX: Make h5p-semi-fullscreen appear above everything. --- js/h5p.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/h5p.js b/js/h5p.js index 8dfbf19..078207c 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -63,9 +63,12 @@ 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 + H5P.$body.prepend($el.replaceWith('
')); var $disable = H5P.jQuery('Disable fullscreen').appendTo($el); var keyup, disableSemiFullscreen = function () { $el.add(H5P.$body).removeClass('h5p-semi-fullscreen'); + $('#h5pfullscreenreplacementplaceholder').replaceWith($el); $disable.remove(); H5P.$body.unbind('keyup', keyup); From 5014df84cdb9ba7028a8808cccfd00eca65af1af Mon Sep 17 00:00:00 2001 From: Frank Ronny Larsen Date: Tue, 13 Aug 2013 15:00:11 +0200 Subject: [PATCH 3/3] BUGFIX: Previous fix lost events in H5P. --- js/h5p.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 078207c..0bb48c7 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -63,12 +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 - H5P.$body.prepend($el.replaceWith('
')); + // 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').replaceWith($el); + $('#h5pfullscreenreplacementplaceholder').before($el).remove(); $disable.remove(); H5P.$body.unbind('keyup', keyup);