Harmonize with web version, better style, fix for Firefox 45.9.0 ESR
[qomet.git] / public / javascripts / components / statements.js
index 8cfbde3..819d723 100644 (file)
@@ -1,7 +1,7 @@
 Vue.component("statements", {
        // 'answers' is an object containing
        //   'inputs'(array),
-       //   'displayAll'(bool),
+       //   'displayAll'(bool), //TODO: should be in questions!
        //   'showSolution'(bool),
        //   'indices': order of appearance
        //   'index': current integer index (focused question)
@@ -48,6 +48,7 @@ Vue.component("statements", {
                                                                change: e => { this.answers.inputs[i][idx] = e.target.checked; },
                                                        },
                                                },
+                                               [ '' ] //to work in Firefox 45.9 ESR @ ENSTA...
                                        )
                                );
                                option.push(
@@ -88,6 +89,8 @@ Vue.component("statements", {
                                        optionList
                                )
                        );
+                       if (this.answers.displayAll && i < this.questions.length-1)
+                               questionContent.push( h("hr") );
                        return h(
                                "div",
                                {