Skip to content
Snippets Groups Projects
Commit a99c57ff authored by Anthony's avatar Anthony
Browse files

Fix dropdown "jumping" issue

parent 6cb11c0b
Branches
No related tags found
No related merge requests found
...@@ -188,8 +188,16 @@ em:not(:has(strong)) { ...@@ -188,8 +188,16 @@ em:not(:has(strong)) {
padding: 3px; padding: 3px;
padding-right: 4px; padding-right: 4px;
border-radius: 5px; border-radius: 5px;
}
// ***********************************
// Dropdowns
// ***********************************
// Min width for dropdowns
.sv-dropdown_select-wrapper {
min-width: 150px !important;
} }
@import "plugins/_scrollbars.scss"; @import "plugins/_scrollbars.scss";
...@@ -138,6 +138,18 @@ $(function () { ...@@ -138,6 +138,18 @@ $(function () {
helpButton.onclick = () => toggleHelpComment(options.question, options.htmlElement); helpButton.onclick = () => toggleHelpComment(options.question, options.htmlElement);
options.htmlElement.appendChild(helpButton); options.htmlElement.appendChild(helpButton);
} }
if( options.question.getType() === "dropdown" ) {
// Very ugly fix to avoid sliding dropdown on focus
$('.book-article').css({
'will-change' : 'unset',
'transition': 'none',
});
$('.book-page').css({
'will-change' : 'unset',
'transition': 'none',
});
}
}); });
// Add "Check answers" button // Add "Check answers" button
......
{ {
"pages": [ "correctComment": "C'est cela!\n **OF** est le seul mot commun aux deux énoncés.",
{ "incorrectComment": "Vous vous trompez.\n **OF** est le seul mot commun aux deux énoncés. Vous pouvez réécouter les énoncés.",
"elements": [
{
"name": "pg310_1",
"type": "radiogroup",
"title": "<div><audio id=\"e29anj_s1lc_remarque_accen1_13_1.mp3\"><source src=\"/macao-hugo/media/e29anj_s1lc_remarque_accen1/e29anj_s1lc_remarque_accen1_13.mp3\" type=\"audio/mpeg\"></audio><button onclick=\"document.getElementById('e29anj_s1lc_remarque_accen1_13_1.mp3').play()\" class=\"notext\">Play</button> AAA</div>",
"choices": [
{
"value": 0,
"text": "Test 1;"
},
{
"value": 1,
"text": "Test 1;"
}
],
"correctAnswer": 0
}
]
},
{
"elements": [ "elements": [
{ {
"name": "pg310_2", "type": "dropdown",
"type": "radiogroup", "name": "question1",
"title": "<div><audio id=\"e29anj_s1lc_remarque_accen1_13_2.mp3\"><source src=\"/macao-hugo/media/e29anj_s1lc_remarque_accen1/e29anj_s1lc_remarque_accen1_13.mp3\" type=\"audio/mpeg\"></audio><button onclick=\"document.getElementById('e29anj_s1lc_remarque_accen1_13_2.mp3').play()\" class=\"notext\">Play</button> BBB</div>", "customFormat": "one_line",
"title": "<div><audio id=\"e29_macao1_2b11_01.mp3\" ><source src=\"/macao-hugo\/macao\/static\/media\/e29_macao1_2b11\/e29_macao1_2b11_01.mp3\" type=\"audio\/mpeg\"><\/audio><button onclick=\"document.getElementById('e29_macao1_2b11_01.mp3').play()\">Play<\/button><\/div> <div><audio id=\"e29_macao1_2b21_01.mp3\" ><source src=\"\/macao-hugo\/macao\/static\/media\/e29_macao1_2b21\/e29_macao1_2b21_01.mp3\" type=\"audio\/mpeg\"><\/audio><button onclick=\"document.getElementById('e29_macao1_2b21_01.mp3').play()\">Play<\/button><\/div>",
"choices": [ "choices": [
{ { "value": 1, "text": "at" },
"value": 0, { "value": 2, "text": "for" },
"text": "&Test 1;" { "value": 3, "text": "in" },
}, { "value": 4, "text": "of" },
{ { "value": 5, "text": "on" },
"value": 1, { "value": 6, "text": "to" }
"text": "Test1;"
}
], ],
"correctAnswer": 0 "enableHtml": true,
"correctAnswer": 4
} }
] ]
} }
],
"goNextPageAutomatic": true,
"showQuestionNumbers": "none",
"isSurveySummaryVisible": true,
"processValue": true
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment