Use correct element.

redesign-copyrights
Frode Petterson 2015-05-12 10:04:21 +02:00
parent 5568a59854
commit ca0c848e0f
1 changed files with 3 additions and 1 deletions

View File

@ -159,7 +159,7 @@ H5P.init = function (target) {
// Add copyright dialog button // Add copyright dialog button
H5P.jQuery('<li class="h5p-button h5p-copyrights" role="button" tabindex="1" title="' + H5P.t('copyrightsDescription') + '">' + H5P.t('copyrights') + '</li>').appendTo($actions).click(function () { H5P.jQuery('<li class="h5p-button h5p-copyrights" role="button" tabindex="1" title="' + H5P.t('copyrightsDescription') + '">' + H5P.t('copyrights') + '</li>').appendTo($actions).click(function () {
// Open dialog with copyright information // 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(); dialog.open();
}); });
} }
@ -880,6 +880,8 @@ H5P.Dialog = function (name, title, content, $element) {
* @returns {string} Copyright information. * @returns {string} Copyright information.
*/ */
H5P.getCopyrights = function (instance, parameters, contentId) { H5P.getCopyrights = function (instance, parameters, contentId) {
var copyrights;
if (instance.getCopyrights !== undefined) { if (instance.getCopyrights !== undefined) {
// Use the instance's own copyright generator // Use the instance's own copyright generator
copyrights = instance.getCopyrights(); copyrights = instance.getCopyrights();