summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authoradityacp2020-11-12 17:33:44 +0530
committeradityacp2020-11-12 17:33:44 +0530
commit06747caf41af01f35a8ac986b200774b008d4bed (patch)
treeb652de2f027fb98caf597dfe76402d5df4249570 /yaksh/static
parent11a6ffba5da1501878109aa727cc9a8f55311af1 (diff)
downloadonline_test-06747caf41af01f35a8ac986b200774b008d4bed.tar.gz
online_test-06747caf41af01f35a8ac986b200774b008d4bed.tar.bz2
online_test-06747caf41af01f35a8ac986b200774b008d4bed.zip
Change templates and js
- Fix issue onlick toc jump to player time - Use bootstrap modal instead of jquery dialog for responsive interface - Disallow empty question submission for lesson quiz
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/show_toc.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/yaksh/static/yaksh/js/show_toc.js b/yaksh/static/yaksh/js/show_toc.js
index 55e9236..be08e78 100644
--- a/yaksh/static/yaksh/js/show_toc.js
+++ b/yaksh/static/yaksh/js/show_toc.js
@@ -118,11 +118,8 @@ function unlock_screen() {
}
function show_question(data) {
- $("#dialog").html(data);
- $("#dialog").dialog({
- width: 800,
- height: 500,
- });
+ $("#myModal").modal({backdrop: 'static', keyboard: false});
+ $("#lesson_quiz_question").html(data)
$("#submit-quiz-form").submit(function(e) {
e.preventDefault();
lock_screen();
@@ -135,7 +132,7 @@ function show_question(data) {
function select_toc(element) {
var toc_id = element.getAttribute("data-toc");
var content_type = element.getAttribute("data-toc-type");
- var toc_time = $("#toc_time_"+toc_id).val();
+ var toc_time = $("#toc_time_"+toc_id).html().trim();
player.currentTime = get_time_in_seconds(toc_time);
if (content_type == 1) {
show_topic($("#toc_desc_"+toc_id).val(), true);
@@ -199,8 +196,8 @@ function ajax_call(url, method, data, csrf, screen_lock=true) {
show_question(msg.data);
}
if (msg.message) {
+ $("#myModal").modal('hide');
if (msg.success) {
- $("#dialog").dialog("close");
show_message(msg.message, "success");
}
else {