diff --git a/.gitignore b/.gitignore index b25c15b..e266972 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *~ +/nbproject/private/ \ No newline at end of file diff --git a/css/questionset.css b/css/questionset.css index 693b60f..52eb139 100644 --- a/css/questionset.css +++ b/css/questionset.css @@ -53,10 +53,10 @@ box-shadow: 0 0 0.5em #c7c7c7; } .progress-dot.answered { - background: #bccade; + background: #73a2d5; } .progress-dot.current { - background: #267ec9; + background: #285585; } .intro-page .title { @@ -96,14 +96,14 @@ } .qs-footer .button, .qs-startbutton, .qs-finishbutton, .questionset-results .button, .video-container > .button { display: inline-block; - padding: 0.2em 1em; + padding: 0 0.7em; border: 0.2em solid #fff; border-radius: 0.4em; margin: 0 0.5em 1em; cursor: pointer; color: #ffffff; box-shadow: 0 0 0.5em #999; - + line-height: 1.9em; background: rgb(100,152,254); /* Old browsers */ background: -moz-linear-gradient(top, rgba(100,152,254,1) 0%, rgba(4,104,206,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,152,254,1)), color-stop(100%,rgba(4,104,206,1))); /* Chrome,Safari4+ */ @@ -116,7 +116,7 @@ text-decoration: none; box-shadow: 0 0 0.5em #999; color: #ffffff; - + border-color: #fff; background: rgb(4,104,206); /* Old browsers */ background: -moz-linear-gradient(top, rgba(4,104,206,1) 0%, rgba(100,152,254,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(4,104,206,1)), color-stop(100%,rgba(100,152,254,1))); /* Chrome,Safari4+ */ @@ -139,12 +139,12 @@ .qs-footer a.next.button:after { font-family: 'H5PFontAwesome4'; - content: " \f054"; /* TODO: Use margin not whitespace, spacing is not content! */ + content: "\f054"; /* TODO: Use margin not whitespace, spacing is not content! */ } .qs-footer a.prev.button:before { font-family: 'H5PFontAwesome4'; - content: "\f053 "; + content: "\f053"; } .questionset-results .qs-finishbutton { @@ -247,7 +247,7 @@ content: ""; font-size: 5em; position: absolute; - left: -15px; + left: -14px; top: 36px; height: 0; width: 0; diff --git a/js/questionset.js b/js/questionset.js index 078173b..cd75192 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -152,8 +152,8 @@ H5P.QuestionSet = function (options, contentId) { // Trigger resize on question in case the size of the QS has changed. var instance = questionInstances[questionNumber]; - if (instance.resize !== undefined) { - instance.resize(); + if (instance.$ !== undefined) { + instance.$.trigger('resize'); } // Update progress indicator @@ -342,6 +342,8 @@ H5P.QuestionSet = function (options, contentId) { if (renderSolutions) { showSolutions(); } + + this.$.trigger('resize'); return this; }; diff --git a/language/nb.json b/language/nb.json index f679ee7..c5e68e8 100644 --- a/language/nb.json +++ b/language/nb.json @@ -1,5 +1,29 @@ { "semantics": [ + { + "label": "Introduksjon", + "fields": [ + { + "label": "Vis introduksjon" + }, + { + "label": "Tittel", + "description": "Tittel for intoduksjonssiden." + }, + { + "label": "Introduksjonstekst", + "description": "Denne teksten vises før spørsmålssettet starter." + }, + { + "label": "Tekst til \"Start\" knappen", + "default": "Start" + }, + { + "label": "Bakgrunnsbilde", + "description": "Bakgrunnsbilde for introduksjonssiden" + } + ] + }, { "label": "Bakgrunnsbilde", "description": "Bakgrunnsbilde for spørsmålssettet(ikke obligatorisk)." @@ -33,30 +57,6 @@ ] } }, - { - "label": "Introduksjon", - "fields": [ - { - "label": "Vis introduksjon" - }, - { - "label": "Tittel", - "description": "Tittel for intoduksjonssiden." - }, - { - "label": "Introduksjonstekst", - "description": "Denne teksten vises før spørsmålssettet starter." - }, - { - "label": "Tekst til \"Start\" knappen", - "default": "Start" - }, - { - "label": "Bakgrunnsbilde", - "description": "Bakgrunnsbilde for introduksjonssiden" - } - ] - }, { "label": "Ledetekster", "fields": [ @@ -75,7 +75,7 @@ { "label": "Fremdriftstekst", "description": "Tekst brukt hvis tekstlig angivelse av fremdrift er valgt. Variabler: @current og @total", - "default": "Deloppgåve @current av @total" + "default": "Deloppgave @current av @total" } ] }, diff --git a/language/nn.json b/language/nn.json index 9a558c7..e14190f 100644 --- a/language/nn.json +++ b/language/nn.json @@ -1,5 +1,29 @@ { "semantics": [ + { + "label": "Introduksjon", + "fields": [ + { + "label": "Vis introduksjon" + }, + { + "label": "Tittel", + "description": "Tittel for intoduksjonssiden." + }, + { + "label": "Introduksjonstekst", + "description": "Denne teksten vises før spørsmålssettet starter." + }, + { + "label": "Tekst til \"Start\" knappen", + "default": "Start" + }, + { + "label": "Bakgrunnsbilde", + "description": "Bakgrunnsbilde for introduksjonssiden" + } + ] + }, { "label": "Bakgrunnsbilde", "description": "Bakgrunnsbilde for spørsmålssettet(ikke obligatorisk)." @@ -33,30 +57,6 @@ ] } }, - { - "label": "Introduksjon", - "fields": [ - { - "label": "Vis introduksjon" - }, - { - "label": "Tittel", - "description": "Tittel for intoduksjonssiden." - }, - { - "label": "Introduksjonstekst", - "description": "Denne teksten vises før spørsmålssettet starter." - }, - { - "label": "Tekst til \"Start\" knappen", - "default": "Start" - }, - { - "label": "Bakgrunnsbilde", - "description": "Bakgrunnsbilde for introduksjonssiden" - } - ] - }, { "label": "Ledetekster", "fields": [ diff --git a/library.json b/library.json index c1f917f..a172167 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "contentType": "question", "majorVersion": 1, "minorVersion": 0, - "patchVersion": 52, + "patchVersion": 55, "runnable": 1, "fullscreen": 0, "machineName": "H5P.QuestionSet", diff --git a/semantics.json b/semantics.json index 21583b4..7e061cc 100644 --- a/semantics.json +++ b/semantics.json @@ -1,57 +1,4 @@ [ - { - "name": "backgroundImage", - "type": "image", - "label": "Background image", - "optional": true, - "description": "An optional background image for the Question set." - }, - { - "name": "progressType", - "type": "select", - "label": "Progress indicator", - "description": "Question set progress indicator style.", - "options": [ - { - "value": "textual", - "label": "Textual" - }, - { - "value": "dots", - "label": "Dots" - } - ], - "default": "dots" - }, - { - "name": "passPercentage", - "type": "number", - "label": "Pass percentage", - "description": "Percentage of Total score required for passing the quiz.", - "min": 0, - "max": 100, - "step": 1, - "default": 50 - }, - { - "name": "questions", - "label": "Questions", - "type": "list", - "widget": "verticalTabs", - "min": 1, - "entity": "question", - "field": { - "name": "question", - "type": "library", - "label": "Question type", - "description": "Library for this question.", - "options": [ - "H5P.MultiChoice 1.0", - "H5P.DragQuestion 1.0", - "H5P.Blanks 1.0" - ] - } - }, { "name": "introPage", "type": "group", @@ -107,6 +54,59 @@ } ] }, + { + "name": "backgroundImage", + "type": "image", + "label": "Background image", + "optional": true, + "description": "An optional background image for the Question set." + }, + { + "name": "progressType", + "type": "select", + "label": "Progress indicator", + "description": "Question set progress indicator style.", + "options": [ + { + "value": "textual", + "label": "Textual" + }, + { + "value": "dots", + "label": "Dots" + } + ], + "default": "dots" + }, + { + "name": "passPercentage", + "type": "number", + "label": "Pass percentage", + "description": "Percentage of Total score required for passing the quiz.", + "min": 0, + "max": 100, + "step": 1, + "default": 50 + }, + { + "name": "questions", + "label": "Questions", + "type": "list", + "widget": "verticalTabs", + "min": 1, + "entity": "question", + "field": { + "name": "question", + "type": "library", + "label": "Question type", + "description": "Library for this question.", + "options": [ + "H5P.MultiChoice 1.0", + "H5P.DragQuestion 1.0", + "H5P.Blanks 1.0" + ] + } + }, { "name": "texts", "type": "group", @@ -278,4 +278,4 @@ } ] } -] \ No newline at end of file +]