From f07bd8dfc3623428d336e30c6495936e846c6fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20J=C3=B8rgensen?= Date: Fri, 14 Nov 2014 15:06:07 +0100 Subject: [PATCH 1/2] Changing background-color from black to white when using background image --- js/questionset.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index cd75192..10db075 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -282,16 +282,16 @@ H5P.QuestionSet = function (options, contentId) { if (params.backgroundImage !== undefined) { $myDom.css({ 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' }); } - + if (params.introPage.backgroundImage !== undefined) { var $intro = $myDom.find('.intro-page'); if ($intro.length) { $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' }); } @@ -342,7 +342,7 @@ H5P.QuestionSet = function (options, contentId) { if (renderSolutions) { showSolutions(); } - + this.$.trigger('resize'); return this; }; @@ -364,7 +364,7 @@ H5P.QuestionSet = function (options, contentId) { } return score; }; - + /** * Gather copyright information for the current content. * @@ -372,14 +372,14 @@ H5P.QuestionSet = function (options, contentId) { */ var getCopyrights = function () { var info = new H5P.ContentCopyrights(); - + // Background if (params.backgroundImage !== undefined && params.backgroundImage.copyright !== undefined) { 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)); info.addMedia(background); } - + // Questions for (var i = 0; i < questionInstances.length; i++) { var questionInstance = questionInstances[i]; @@ -391,7 +391,7 @@ H5P.QuestionSet = function (options, contentId) { } } } - + // Success video if (params.endGame.successVideo !== undefined && params.endGame.successVideo.length > 0) { var video = params.endGame.successVideo[0]; @@ -399,7 +399,7 @@ H5P.QuestionSet = function (options, contentId) { info.addMedia(new H5P.MediaCopyright(video.copyright)); } } - + // Fail video if (params.endGame.failVideo !== undefined && params.endGame.failVideo.length > 0) { video = params.endGame.failVideo[0]; @@ -407,7 +407,7 @@ H5P.QuestionSet = function (options, contentId) { info.addMedia(new H5P.MediaCopyright(video.copyright)); } } - + return info; }; From 42395bcb183a1f14658d2abf7e602f254c784972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20J=C3=B8rgensen?= Date: Mon, 17 Nov 2014 09:30:45 +0100 Subject: [PATCH 2/2] Bumped patchVersion --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index 397fadb..2057c17 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 0, - "patchVersion": 57, + "patchVersion": 58, "runnable": 1, "fullscreen": 0, "machineName": "H5P.QuestionSet",