From 7a60f782995eed0352f3172f445bb35ae8ee6aa9 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Mon, 14 Sep 2015 12:28:41 +0530 Subject: Remove testapp dir, remove reference to testapp in paths, files --- testapp/yaksh/static/yaksh_app/js/edit_question.js | 278 --------------------- 1 file changed, 278 deletions(-) delete mode 100644 testapp/yaksh/static/yaksh_app/js/edit_question.js (limited to 'testapp/yaksh/static/yaksh_app/js/edit_question.js') diff --git a/testapp/yaksh/static/yaksh_app/js/edit_question.js b/testapp/yaksh/static/yaksh_app/js/edit_question.js deleted file mode 100644 index 7a0f56d..0000000 --- a/testapp/yaksh/static/yaksh_app/js/edit_question.js +++ /dev/null @@ -1,278 +0,0 @@ -function render_question(frm) -{ - for(var i=1;i<=frm.description.length;i++) - { - document.getElementById('my'+i).innerHTML = frm.description[i-1].value; - } - -} - -function increase(frm,n) -{ - var newValue = document.getElementById('id_points'+ (n-1)).value ; - - if( newValue == "") - { - document.getElementById('id_points'+(n-1)).value = "0.5"; - return; - } - document.getElementById('id_points' + (n-1)).value = parseFloat(newValue) + 0.5; -} - -function decrease(frm,n) -{ - var newValue = document.getElementById('id_points'+ (n-1)).value ; - - if( newValue > 0) - { - document.getElementById('id_points' + (n-1)).value = parseFloat(newValue) - 0.5; - } - else - { - document.getElementById('id_points' + (n-1)).value = 0; - } -} - -function grade_data(showHideDiv) -{ - var ele=document.getElementById(showHideDiv); - if (ele.style.display=="block") - { - ele.style.display = "none"; - } - else - { - ele.style.display = "block"; - } -} - -function setSelectionRange(input, selectionStart, selectionEnd) -{ - if (input.setSelectionRange) - { - input.focus(); - input.setSelectionRange(selectionStart, selectionEnd); - } - else if (input.createTextRange) - { - var range = input.createTextRange(); - range.collapse(true); - range.moveEnd('character', selectionEnd); - range.moveStart('character', selectionStart); - range.select(); - } -} - -function replaceSelection (input, replaceString) -{ - if (input.setSelectionRange) - { - var selectionStart = input.selectionStart; - var selectionEnd = input.selectionEnd; - input.value = input.value.substring(0, selectionStart)+ replaceString + input.value.substring(selectionEnd); - if (selectionStart != selectionEnd) - { - setSelectionRange(input, selectionStart, selectionStart + replaceString.length); - } - else - { - setSelectionRange(input, selectionStart + replaceString.length, selectionStart + replaceString.length); - } - } - else if (document.selection) - { - var range = document.selection.createRange(); - if (range.parentElement() == input) - { - var isCollapsed = range.text == ''; - range.text = replaceString; - if (!isCollapsed) - { - range.moveStart('character', -replaceString.length); - range.select(); - } - } - } -} - -function data(showContent,showHideDiv,a,summary) -{ - var con = document.getElementById(showContent); - var ele=document.getElementById(showHideDiv); - var atag=document.getElementById(a); - if (ele.style.display=="block") - { - con.style.display = "none" - ele.style.display = "none"; - atag.text = summary; - } - else - { - con.style.display = "block"; - ele.style.display = "block"; - } -} - -function textareaformat() -{ - var point = document.getElementsByName('points'); - var test = document.getElementsByName('test'); - var option = document.getElementsByName('options'); - var descriptions = document.getElementsByName('description'); - var snippets = document.getElementsByName('snippet'); - var language = document.getElementsByName('language') - var type = document.getElementsByName('type'); - var tags = document.getElementsByName('tags'); - for (var i=0;i 0) - { - alert('Enter 4 options. One option per line.'); - return false; - } - return true; -} -- cgit