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