From 0d189e0156741685e6f6f1c605bf99b44d082b0b Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 20 Feb 2020 16:11:05 +0530 Subject: Change complete, grade_user template and add_question js - Add tinymce js editor for question description - Add safe option in grade user while showing question description - Add generice title in the complete template --- yaksh/static/yaksh/js/add_question.js | 13 +++++++++++++ yaksh/templates/yaksh/complete.html | 2 +- yaksh/templates/yaksh/grade_user.html | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'yaksh') diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js index 4d134cd..6cd8b48 100644 --- a/yaksh/static/yaksh/js/add_question.js +++ b/yaksh/static/yaksh/js/add_question.js @@ -161,6 +161,19 @@ function textareaformat() $(this).find('textarea').addClass("form-control"); $(this).find('input[type=number]').addClass("form-control"); }); + + $(function() { + tinymce.init({ + selector: 'textarea#id_description', + setup : function(ed) { + ed.on('change', function(e) { + tinymce.triggerSave(); + }); + }, + max_height: 200, + height: 200 + }); + }); } function autosubmit() diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html index df76e13..2b3897e 100644 --- a/yaksh/templates/yaksh/complete.html +++ b/yaksh/templates/yaksh/complete.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static %} -{% block title %} Complete Quiz {% endblock %} +{% block title %} Complete {% endblock %} {% block nav %}