From ca0c848e0f5799d8e496e7c8006c9ffe09c6a5f0 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 12 May 2015 10:04:21 +0200 Subject: [PATCH] Use correct element. --- js/h5p.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 25597df..6aa425e 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -159,7 +159,7 @@ H5P.init = function (target) { // Add copyright dialog button H5P.jQuery('
  • ' + H5P.t('copyrights') + '
  • ').appendTo($actions).click(function () { // Open dialog with copyright information - var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyright, $element); + var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyright, $container); dialog.open(); }); } @@ -880,6 +880,8 @@ H5P.Dialog = function (name, title, content, $element) { * @returns {string} Copyright information. */ H5P.getCopyrights = function (instance, parameters, contentId) { + var copyrights; + if (instance.getCopyrights !== undefined) { // Use the instance's own copyright generator copyrights = instance.getCopyrights();