summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-11-18 13:01:11 +0530
committerGitHub2020-11-18 13:01:11 +0530
commiteda9184c193f3a6779b834ace796efbb6dad8b7b (patch)
treeb5814267a4f549f13e3c8036c050d735ee52c931 /yaksh/static
parent32c4ed63c4b2a4548b6ca529e44bd98653da5325 (diff)
parent5f92f4db6e108b338ea6509052f0990f1f94c6cb (diff)
downloadonline_test-eda9184c193f3a6779b834ace796efbb6dad8b7b.tar.gz
online_test-eda9184c193f3a6779b834ace796efbb6dad8b7b.tar.bz2
online_test-eda9184c193f3a6779b834ace796efbb6dad8b7b.zip
Merge pull request #769 from CruiseDevice/tinymce
Add TinyMCE, fix minor progressbar issues
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/add_course.js16
-rw-r--r--yaksh/static/yaksh/js/add_grades.js14
-rw-r--r--yaksh/static/yaksh/js/add_quiz.js13
3 files changed, 42 insertions, 1 deletions
diff --git a/yaksh/static/yaksh/js/add_course.js b/yaksh/static/yaksh/js/add_course.js
new file mode 100644
index 0000000..0fba2e9
--- /dev/null
+++ b/yaksh/static/yaksh/js/add_course.js
@@ -0,0 +1,16 @@
+$(document).ready(function () {
+ $(function() {
+ tinymce.init({
+ selector: 'textarea#id_instructions',
+ setup : function(ed) {
+ ed.on('change', function(e) {
+ tinymce.triggerSave();
+ });
+ },
+ max_height: 400,
+ height: 400,
+ plugins: "image code link",
+ convert_urls: false
+ });
+ });
+});
diff --git a/yaksh/static/yaksh/js/add_grades.js b/yaksh/static/yaksh/js/add_grades.js
new file mode 100644
index 0000000..151fef1
--- /dev/null
+++ b/yaksh/static/yaksh/js/add_grades.js
@@ -0,0 +1,14 @@
+$(function() {
+ tinymce.init({
+ selector: 'textarea#id_description',
+ setup : function(ed) {
+ ed.on('change', function(e) {
+ tinymce.triggerSave();
+ });
+ },
+ max_height: 400,
+ height: 400,
+ plugins: "image code link",
+ convert_urls: false
+ });
+ });
diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js
index dab5a3d..38a9dc8 100644
--- a/yaksh/static/yaksh/js/add_quiz.js
+++ b/yaksh/static/yaksh/js/add_quiz.js
@@ -1,6 +1,5 @@
function test()
{
-
document.getElementById('id_duration').setAttribute('class','mini-text form-control');
document.getElementById('id_pass_criteria').setAttribute('class','mini-text form-control');
if (document.getElementById("id_description").value != "")
@@ -13,6 +12,18 @@ function test()
document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ;
});
document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ;
+ tinymce.init({
+ selector: 'textarea#id_instructions',
+ setup : function(ed) {
+ ed.on('change', function(e) {
+ tinymce.triggerSave();
+ });
+ },
+ max_height: 400,
+ height: 400,
+ plugins: "image code link",
+ convert_urls: false
+ });
}
String.prototype.beginsWith = function (string) {