combine start dialogs
This commit is contained in:
@@ -994,4 +994,8 @@ display: block
|
||||
|
||||
.session-completed {
|
||||
border-color: purple;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
+9
-14
@@ -18,10 +18,13 @@
|
||||
<div class="content-panel">
|
||||
<div class="nav-bar">
|
||||
<button id="review-button" class="navigation nav-right"><b>☰</b></button>
|
||||
<button id="submit-button" class="navigation nav-right"><b>submit</b></button>
|
||||
<button id="options-button" class="navigation nav-right" title="click to load new packet or manage saved answers">options</button>
|
||||
<button id="review-overlay-button" class="navigation nav-right" title="click to finish exam and review answers">review</button>
|
||||
<button id="fullscreen-overlay-button" class="navigation nav-right" title="click to toggle fullscreen">fullscreen</button>
|
||||
<button class="submit-button navigation nav-right"><b>submit</b></button>
|
||||
<button id="options-button" class="navigation nav-right"
|
||||
title="click to load new packet or manage saved answers">options</button>
|
||||
<button id="review-overlay-button" class="navigation nav-right"
|
||||
title="click to finish exam and review answers">review</button>
|
||||
<button id="fullscreen-overlay-button" class="navigation nav-right"
|
||||
title="click to toggle fullscreen">fullscreen</button>
|
||||
<!--<button id="logout-button" class="navigation nav-right">logout</button>-->
|
||||
<div class="app-name nav-left">RTS</div>
|
||||
<div id="timer" title="click to pause"></div>
|
||||
@@ -114,16 +117,7 @@
|
||||
Click to start exam.
|
||||
<p>You will have <input type='number' size=2 class='exam-time'></input> minutes.</p>
|
||||
</div>
|
||||
<button class="start-packet-button navigation dialog-yes">Start</button>
|
||||
</div>
|
||||
|
||||
<div id="start-dialog-exam" class="dialog modal no-close">
|
||||
<h3 class="dialog-title">Start exam</h3>
|
||||
<div class="dialog-text">
|
||||
Click to start exam.
|
||||
<p>You will have <input type='number' size=2 class='exam-time2'></input> minutes.</p>
|
||||
</div>
|
||||
<div class="dialog-text">
|
||||
<div id="exam-candidate-number" class="dialog-text hidden">
|
||||
Check your below candidate number is correct.
|
||||
<input type='number' size=10 id='candidate-number2'></input>
|
||||
</div>
|
||||
@@ -137,6 +131,7 @@
|
||||
</div>
|
||||
<button id="time-up-review-button" class="navigation dialog-review">Review</button>
|
||||
<button id="time-up-continue-button" class="navigation dialog-yes">Continue</button>
|
||||
<button id="dialog-submit-button" class="submit-button navigation dialog-review hidden"><b>submit</b></button>
|
||||
</div>
|
||||
|
||||
<div id="login-dialog" class="dialog modal">
|
||||
|
||||
+11
-11
@@ -281,16 +281,10 @@ function setUpQuestions(load_previous) {
|
||||
}
|
||||
}
|
||||
|
||||
// We use a different dialog if we are in an exam
|
||||
let et = ".exam-time";
|
||||
if (window.exam_mode) {
|
||||
et = ".exam-time2";
|
||||
}
|
||||
|
||||
$(et)
|
||||
$(".exam-time")
|
||||
.val(window.exam_time / 60)
|
||||
.change(() => {
|
||||
window.exam_time = $(et).val() * 60;
|
||||
window.exam_time = $(".exam-time").val() * 60;
|
||||
});
|
||||
|
||||
if (window.exam_mode) {
|
||||
@@ -298,8 +292,10 @@ function setUpQuestions(load_previous) {
|
||||
window.cid = parseInt($("#candidate-number2").val());
|
||||
});
|
||||
|
||||
|
||||
$("#start-dialog-exam").modal( {closeExisting: false, // Close existing modals. Set this to false if you need to stack multiple modal instances.
|
||||
$("#start-dialog").addClass("no-close");
|
||||
$("#exam-candidate-number").toggle();
|
||||
$(".packet-database-options").toggle();
|
||||
$("#start-dialog").modal( {closeExisting: false, // Close existing modals. Set this to false if you need to stack multiple modal instances.
|
||||
escapeClose: false, // Allows the user to close the modal by pressing `ESC`
|
||||
clickClose: false, // Allows the user to close the modal by clicking the overlay
|
||||
showClose: false} );
|
||||
@@ -1066,7 +1062,7 @@ $("#btn-local-file-load").click(function (evt) {
|
||||
loadLocalQuestionSet();
|
||||
});
|
||||
|
||||
$("#submit-button").click(function (evt) {
|
||||
$(".submit-button").click(function (evt) {
|
||||
interact.submitAnswers(window, db);
|
||||
});
|
||||
|
||||
@@ -1714,6 +1710,10 @@ $(".start-packet-button").click(function (evt) {
|
||||
$('#timer').html("Time left: " + timer.getTimeValues().toString());
|
||||
});
|
||||
timer.addEventListener("targetAchieved", function (e) {
|
||||
if (window.exam_mode == true) {
|
||||
$("#dialog-submit-button, #time-up-review-button, #time-up-continue-button").toggle();
|
||||
$("#time-up-dialog .dialog-text").text("Allocated time has ended. Click to submit answers.")
|
||||
}
|
||||
$("#time-up-dialog").modal();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user