From 57cc64f28c1b32178e52f5091a3361af6fc538ba Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 11 Apr 2013 14:59:33 +0200 Subject: [PATCH] Added checking for fullscreen. --- h5p.classes.php | 1 + js/h5p.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index d07b8f7..d8e55a1 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -263,6 +263,7 @@ class H5PValidator { 'w' => '/^[0-9]{1,4}$/', 'h' => '/^[0-9]{1,4}$/', 'embedTypes' => array('iframe', 'div'), + 'fullscreen' => '/^(0|1)$/', ); /** diff --git a/js/h5p.js b/js/h5p.js index 22db972..e082212 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -32,7 +32,7 @@ H5P.init = function () { var obj = new (H5P.classFromName($el.data('class')))(H5P.jQuery.parseJSON(H5PIntegration.getJsonContent(contentId)), contentId); obj.attach($el); - if (true/* fullscreen */) { + if (H5PIntegration.getFullscreen(contentId)) { H5P.jQuery('
Enable fullscreen
').insertBefore($el).children().click(function () { H5P.fullScreen($el, obj); return false;