Renamed export JS variable because it's reserved in some browsers.

namespaces
Frode Petterson 2014-05-22 11:18:39 +02:00
parent 4d5e7a4d4a
commit 191a6a575c
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ var H5P = H5P || (function () {
library: content.library, library: content.library,
jsonContent: content.params, jsonContent: content.params,
fullScreen: content.fullscreen, fullScreen: content.fullscreen,
export: content.export, exportUrl: content.exportUrl,
embedCode: content.embedCode embedCode: content.embedCode
}; };
}, },

View File

@ -64,10 +64,10 @@ H5P.init = function () {
}; };
var $actions = H5P.jQuery('<ul class="h5p-actions"></ul>'); var $actions = H5P.jQuery('<ul class="h5p-actions"></ul>');
if (contentData.export !== '') { if (contentData.exportUrl !== '') {
// Display export button // Display export button
H5P.jQuery('<li class="h5p-button h5p-export" role="button" tabindex="1" title="' + H5P.t('downloadDescription') + '">' + H5P.t('download') + '</li>').appendTo($actions).click(function () { H5P.jQuery('<li class="h5p-button h5p-export" role="button" tabindex="1" title="' + H5P.t('downloadDescription') + '">' + H5P.t('download') + '</li>').appendTo($actions).click(function () {
window.location.href = contentData.export; window.location.href = contentData.exportUrl;
}); });
} }
if (instance.getCopyrights !== undefined) { if (instance.getCopyrights !== undefined) {