diff --git a/.gitignore b/.gitignore index e266972..c30f2fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ -/nbproject/private/ \ No newline at end of file +/nbproject/private/ +.idea \ No newline at end of file diff --git a/css/questionset.css b/css/questionset.css index 6f5cf48..22e65d2 100644 --- a/css/questionset.css +++ b/css/questionset.css @@ -35,6 +35,12 @@ .dots-container { text-align: center; line-height: 2em; + padding: 0; + margin: 0; +} +.progress-item { + list-style: none; + display: inline-block; } .progress-dot { display: inline-block; @@ -46,7 +52,12 @@ background: #fff; background: #cecece; } -.progress-dot:hover { + +.progress-dot.disabled { + cursor: default; +} + +.progress-dot:not(.disabled):hover { box-shadow: 0 0 0.5em #c7c7c7; } .progress-dot.answered { @@ -55,6 +66,11 @@ .progress-dot.current { background: #285585; } + +.progress-dot.disabled:focus { + outline: none +} + .progress-dot:focus { outline-color: rgb(40, 130, 211); outline-width: thin; @@ -95,6 +111,7 @@ } .qs-footer { overflow: hidden; + clear: both; } .qs-footer > .prev { @@ -125,6 +142,13 @@ transition: none; } +.qs-progress-announcer { + height: 0; + width: 0; + position: absolute; + overflow: hidden; +} + .h5p-question .h5p-question-prev, .h5p-question .h5p-question-finish, .h5p-question .h5p-question-next { @@ -137,6 +161,12 @@ width: 2.1875em; } +.h5p-question .h5p-question-prev.truncated, +.h5p-question .h5p-question-next.truncated { + padding: 0; + line-height: 2.2335em; +} + .h5p-question .h5p-question-next, .h5p-question .h5p-question-finish { margin: 0 0 1.5em 0.5em; @@ -178,6 +208,7 @@ } .video-container > video { background-color: #000; + width: 100%; } .video-container > .h5p-button { position: absolute; diff --git a/js/questionset.js b/js/questionset.js index 945d2d5..9503447 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -8,11 +8,12 @@ var H5P = H5P || {}; * * @param {Array} options * @param {int} contentId + * @param {Object} contentData * @returns {H5P.QuestionSet} Instance */ -H5P.QuestionSet = function (options, contentId) { +H5P.QuestionSet = function (options, contentId, contentData) { if (!(this instanceof H5P.QuestionSet)) { - return new H5P.QuestionSet(options, contentId); + return new H5P.QuestionSet(options, contentId, contentData); } H5P.EventDispatcher.call(this); var $ = H5P.jQuery; @@ -31,6 +32,7 @@ H5P.QuestionSet = function (options, contentId) { '
' + '' + '<% } %>' + + '' + '