Merge branch 'master' of intern.amendor.com:h5plibs/questionset

d3summaryChart
Frode Petterson 2013-03-07 12:33:53 +01:00
commit c79bb54c4e
5 changed files with 7 additions and 49 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -1,27 +1,3 @@
.questionset {
width: 535px;
height: 400px;
padding: 50px;
background: transparent url(img/Paper-clean.png);
position: absolute;
top: 0;
left: 0;
-webkit-transition: top 2s, left 2s, -webkit-transform 2s;
-moz-transition: top 2s, left 2s, -moz-transform 2s;
-o-transition: top 2s, left 2s, -o-transform 2s;
transition: top 2s, left 2s, transform 2s;
}
.questionset.hidden {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
top: 525px;
left: 100px;
}
.dots-container { .dots-container {
text-align: center; text-align: center;
} }
@ -76,30 +52,10 @@
cursor: pointer; cursor: pointer;
} }
.qs-footer {
position: absolute;
bottom: 50px;
height: 40px;
width: 535px;
}
.qs-progress { .qs-progress {
line-height: 40px; line-height: 40px;
padding: 0; padding: 0;
} }
.qs-footer .button {
position: absolute;
top: 0;
}
.qs-footer .button.next {
right: 0px;
}
.qs-footer .button.finish {
right: 0px;
}
.qs-footer .button.prev {
left: 0px;
}
.questionset-results { .questionset-results {
background-image: url(img/Paper-clean.png); background-image: url(img/Paper-clean.png);
@ -150,6 +106,6 @@
right: 25px; right: 25px;
} }
button { button, .button {
cursor: pointer; cursor: pointer;
} }

View File

@ -118,7 +118,8 @@ H5P.QuestionSet = function (options, contentId) {
for (var i=0; i<params.questions.length; i++) { for (var i=0; i<params.questions.length; i++) {
var question = params.questions[i]; var question = params.questions[i];
// TODO: Render on init, inject in template. // TODO: Render on init, inject in template.
var tmp = new (H5P.classFromName(question.library))(question.params, contentId); var libraryObject = H5P.libraryFromString(question.library);
var tmp = new (H5P.classFromName(libraryObject.machineName))(question.params, contentId);
questionInstances.push(tmp); questionInstances.push(tmp);
} }

View File

@ -14,5 +14,8 @@
], ],
"preloadedCss": [ "preloadedCss": [
{"path": "css/questionset.css"} {"path": "css/questionset.css"}
],
"preloadedDependencies": [
{"machineName": "EmbeddedJS", "majorVersion": 1, "minorVersion": 0}
] ]
} }

View File

@ -64,9 +64,7 @@
"type": "library", "type": "library",
"label": "Question library", "label": "Question library",
"description": "Library for this question.", "description": "Library for this question.",
"options": [ "options": ["H5P.MultiChoice 1.0"]
"H5P.MultiChoice"
]
} }
] ]
} }