summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/course.js31
-rw-r--r--yaksh/static/yaksh/js/show_question.js4
2 files changed, 35 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/course.js b/yaksh/static/yaksh/js/course.js
index 5b79e68..8fb2773 100644
--- a/yaksh/static/yaksh/js/course.js
+++ b/yaksh/static/yaksh/js/course.js
@@ -35,4 +35,35 @@ $(".reject").change( function(){
});
}
});
+
+$(function() {
+ $('textarea#email_body').froalaEditor({
+ heightMin: 200,
+ heightMax: 200
+ })
+ });
+
+$("#send_mail").click(function(){
+ var subject = $("#subject").val();
+ var body = $('#email_body').val();
+ var status = false;
+ var selected = [];
+ $('#reject input:checked').each(function() {
+ selected.push($(this).attr('value'));
+ });
+
+ if (subject == '' || body == ''){
+ $("#error_msg").html("Please enter mail details");
+ $("#dialog").dialog();
+ }
+ else if (selected.length == 0){
+ $("#error_msg").html("Please select atleast one user");
+ $("#dialog").dialog();
+ }
+ else {
+ status = true;
+ }
+ return status;
+});
+
});
diff --git a/yaksh/static/yaksh/js/show_question.js b/yaksh/static/yaksh/js/show_question.js
index a154558..e6825a0 100644
--- a/yaksh/static/yaksh/js/show_question.js
+++ b/yaksh/static/yaksh/js/show_question.js
@@ -47,3 +47,7 @@ function append_tag(tag){
tag_name.value = tag.value;
}
}
+$(document).ready(function()
+ {
+ $("#questions-table").tablesorter({sortList: [[0,0], [4,0]]});
+ });