Fixed missing translations.

Fixed video-support.
Removed random order and initial question index.
pull/1/head
Frode Petterson 2013-05-03 15:24:17 +02:00
parent 502503988d
commit b32a3ceb54
3 changed files with 25 additions and 16 deletions

View File

@ -1,3 +1,6 @@
.questionset, .intro-page, .questionset-results {
overflow: hidden;
}
.questionset.hidden { .questionset.hidden {
display: none; display: none;
} }
@ -49,7 +52,7 @@
overflow: hidden; overflow: hidden;
} }
.qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button { .qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button, .video-container > .button {
display: block; display: block;
line-height: 1.25em; line-height: 1.25em;
padding: 0.25em 1em; padding: 0.25em 1em;
@ -66,7 +69,7 @@
background-image: -ms-linear-gradient(top, #3999ea, #267ec9); background-image: -ms-linear-gradient(top, #3999ea, #267ec9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3999ea', endColorstr='#267ec9',GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3999ea', endColorstr='#267ec9',GradientType=0);
} }
.qs-footer .button:hover, .qs-startbutton:hover, .questionset-results .button:hover { .qs-footer .button:hover, .qs-startbutton:hover, .questionset-results .button:hover, .video-container > .button:hover {
text-decoration: none; text-decoration: none;
color: #fff; color: #fff;
box-shadow: 0 0 0.5em #267ec9; box-shadow: 0 0 0.5em #267ec9;
@ -84,6 +87,17 @@
.questionset-results .qs-finishbutton { .questionset-results .qs-finishbutton {
display: none; display: none;
} }
.video-container {
position: relative;
}
.video-container > video {
background-color: #000;
}
.video-container > .button {
position: absolute;
top: 0.5em;
right: 0.5em;
}
.qs-progress { .qs-progress {
text-align: center; text-align: center;

View File

@ -76,7 +76,7 @@ H5P.QuestionSet = function (options, contentId) {
passPercentage: 50, passPercentage: 50,
questions: [], questions: [],
introPage: { introPage: {
showIntroPage: true, showIntroPage: false,
title: '', title: '',
introduction: '', introduction: '',
startButtonText: 'Start' startButtonText: 'Start'
@ -239,6 +239,7 @@ H5P.QuestionSet = function (options, contentId) {
if (params.endGame.showAnimations) { if (params.endGame.showAnimations) {
var videoData = success ? params.endGame.successVideo : params.endGame.failVideo; var videoData = success ? params.endGame.successVideo : params.endGame.failVideo;
if (videoData) { if (videoData) {
$myDom.children().hide();
var $videoContainer = $('<div class="video-container"></div>').appendTo($myDom); var $videoContainer = $('<div class="video-container"></div>').appendTo($myDom);
var video = new H5P.Video({ var video = new H5P.Video({

View File

@ -5,19 +5,6 @@
"label": "Title", "label": "Title",
"description": "Question set title (optional)." "description": "Question set title (optional)."
}, },
{
"name": "randomOrder",
"type": "boolean",
"label": "Randomize order",
"description": "Whether questions should be shown in random order."
},
{
"name": "initialQuestion",
"type": "number",
"label": "Initial question",
"description": "Which question to start with. Count from 0.",
"default": 0
},
{ {
"name": "backgroundImage", "name": "backgroundImage",
"type": "image", "type": "image",
@ -185,6 +172,13 @@
"default": "This didn't go so well.", "default": "This didn't go so well.",
"description": "This comment will be displayed after the score if the user has failed the quiz." "description": "This comment will be displayed after the score if the user has failed the quiz."
}, },
{
"name": "solutionButtonText",
"type": "text",
"label": "Solution button label",
"default": "Show solution",
"description": "Text for the solution button."
},
{ {
"name": "finishButtonText", "name": "finishButtonText",
"type": "text", "type": "text",