Merge tag '1.0.58' into stable

pull/1/head
Pål Jørgensen 2014-11-17 09:33:19 +01:00
commit 890b479179
2 changed files with 11 additions and 11 deletions

View File

@ -282,16 +282,16 @@ H5P.QuestionSet = function (options, contentId) {
if (params.backgroundImage !== undefined) { if (params.backgroundImage !== undefined) {
$myDom.css({ $myDom.css({
overflow: 'hidden', overflow: 'hidden',
background: '#000 url("' + H5P.getPath(params.backgroundImage.path, contentId) + '") no-repeat 50% 50%', background: '#fff url("' + H5P.getPath(params.backgroundImage.path, contentId) + '") no-repeat 50% 50%',
backgroundSize: '100% auto' backgroundSize: '100% auto'
}); });
} }
if (params.introPage.backgroundImage !== undefined) { if (params.introPage.backgroundImage !== undefined) {
var $intro = $myDom.find('.intro-page'); var $intro = $myDom.find('.intro-page');
if ($intro.length) { if ($intro.length) {
$intro.css({ $intro.css({
background: '#000 url("' + H5P.getPath(params.introPage.backgroundImage.path, contentId) + '") no-repeat 50% 50%', background: '#fff url("' + H5P.getPath(params.introPage.backgroundImage.path, contentId) + '") no-repeat 50% 50%',
backgroundSize: '100% auto' backgroundSize: '100% auto'
}); });
} }
@ -342,7 +342,7 @@ H5P.QuestionSet = function (options, contentId) {
if (renderSolutions) { if (renderSolutions) {
showSolutions(); showSolutions();
} }
this.$.trigger('resize'); this.$.trigger('resize');
return this; return this;
}; };
@ -364,7 +364,7 @@ H5P.QuestionSet = function (options, contentId) {
} }
return score; return score;
}; };
/** /**
* Gather copyright information for the current content. * Gather copyright information for the current content.
* *
@ -372,14 +372,14 @@ H5P.QuestionSet = function (options, contentId) {
*/ */
var getCopyrights = function () { var getCopyrights = function () {
var info = new H5P.ContentCopyrights(); var info = new H5P.ContentCopyrights();
// Background // Background
if (params.backgroundImage !== undefined && params.backgroundImage.copyright !== undefined) { if (params.backgroundImage !== undefined && params.backgroundImage.copyright !== undefined) {
var background = new H5P.MediaCopyright(params.backgroundImage.copyright); var background = new H5P.MediaCopyright(params.backgroundImage.copyright);
background.setThumbnail(new H5P.Thumbnail(H5P.getPath(params.backgroundImage.path, contentId), params.backgroundImage.width, params.backgroundImage.height)); background.setThumbnail(new H5P.Thumbnail(H5P.getPath(params.backgroundImage.path, contentId), params.backgroundImage.width, params.backgroundImage.height));
info.addMedia(background); info.addMedia(background);
} }
// Questions // Questions
for (var i = 0; i < questionInstances.length; i++) { for (var i = 0; i < questionInstances.length; i++) {
var questionInstance = questionInstances[i]; var questionInstance = questionInstances[i];
@ -391,7 +391,7 @@ H5P.QuestionSet = function (options, contentId) {
} }
} }
} }
// Success video // Success video
if (params.endGame.successVideo !== undefined && params.endGame.successVideo.length > 0) { if (params.endGame.successVideo !== undefined && params.endGame.successVideo.length > 0) {
var video = params.endGame.successVideo[0]; var video = params.endGame.successVideo[0];
@ -399,7 +399,7 @@ H5P.QuestionSet = function (options, contentId) {
info.addMedia(new H5P.MediaCopyright(video.copyright)); info.addMedia(new H5P.MediaCopyright(video.copyright));
} }
} }
// Fail video // Fail video
if (params.endGame.failVideo !== undefined && params.endGame.failVideo.length > 0) { if (params.endGame.failVideo !== undefined && params.endGame.failVideo.length > 0) {
video = params.endGame.failVideo[0]; video = params.endGame.failVideo[0];
@ -407,7 +407,7 @@ H5P.QuestionSet = function (options, contentId) {
info.addMedia(new H5P.MediaCopyright(video.copyright)); info.addMedia(new H5P.MediaCopyright(video.copyright));
} }
} }
return info; return info;
}; };

View File

@ -3,7 +3,7 @@
"contentType": "question", "contentType": "question",
"majorVersion": 1, "majorVersion": 1,
"minorVersion": 0, "minorVersion": 0,
"patchVersion": 57, "patchVersion": 58,
"runnable": 1, "runnable": 1,
"fullscreen": 0, "fullscreen": 0,
"machineName": "H5P.QuestionSet", "machineName": "H5P.QuestionSet",