summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authorankitjavalkar2016-04-26 19:37:42 +0530
committerankitjavalkar2016-05-05 19:19:00 +0530
commitc557e19470a389aaac569516ed56e1c5b453fd88 (patch)
tree9e4ac79d2ece44f434aa0625d58e198e6875102c /yaksh/static
parent5684b1b19fcb383f494f0bfc04ad1bb760abce74 (diff)
downloadonline_test-c557e19470a389aaac569516ed56e1c5b453fd88.tar.gz
online_test-c557e19470a389aaac569516ed56e1c5b453fd88.tar.bz2
online_test-c557e19470a389aaac569516ed56e1c5b453fd88.zip
Add views, forms and templates (with JS) for new test cases:
- Add a view and template to list out test cases for particular question - Add a view and template to add/edit test cases
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/show_testcase.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/show_testcase.js b/yaksh/static/yaksh/js/show_testcase.js
new file mode 100644
index 0000000..71be9dc
--- /dev/null
+++ b/yaksh/static/yaksh/js/show_testcase.js
@@ -0,0 +1,24 @@
+function confirm_delete(frm)
+{
+ var n=0;
+ test_case = document.getElementsByName('test_case');
+ for (var i =0;i<test_case.length;i++)
+ {
+ if (test_case[i].checked == false)
+ n = n + 1 ;
+ }
+ if(n==test_case.length)
+ {
+ alert("Please Select at least one test case");
+ return false;
+ }
+ var r = confirm("Are you Sure ?");
+ if(r==false)
+ {
+ for(i=0;i<test_case.length;i++)
+ {
+ test_case[i].checked=false;
+ }
+ return false;
+ }
+} \ No newline at end of file