summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authorankitjavalkar2016-06-06 18:04:33 +0530
committerankitjavalkar2016-06-07 18:04:25 +0530
commit1b83aa2da97212cb839086ef5c91a6f9e68a3a36 (patch)
treee407530e371106ba37a78fcbb980659f7a75721a /yaksh/static
parent42a77fcf968c532dc1cb61fab9f45a9903067e61 (diff)
downloadonline_test-1b83aa2da97212cb839086ef5c91a6f9e68a3a36.tar.gz
online_test-1b83aa2da97212cb839086ef5c91a6f9e68a3a36.tar.bz2
online_test-1b83aa2da97212cb839086ef5c91a6f9e68a3a36.zip
Escape quotes in codemirror
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/question.js142
1 files changed, 0 insertions, 142 deletions
diff --git a/yaksh/static/yaksh/js/question.js b/yaksh/static/yaksh/js/question.js
index 2a8843c..96ff3de 100644
--- a/yaksh/static/yaksh/js/question.js
+++ b/yaksh/static/yaksh/js/question.js
@@ -10,145 +10,3 @@ function submitCode()
document.getElementById("skip").disabled = true;
}
}
-
-// 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 autoresize()
-// {
-// var ta = document.getElementById('answer');
-// var divta = document.getElementById('AnswerWithLines');
-// ta.style.height="";
-// var height = ta.scrollHeight;
-// ta.style.height = 'auto';
-// ta.style.height = height+'px';
-// divta.style.height = height+'px';
-// }
-
-// function catchTab(item,e)
-// {
-// if(navigator.userAgent.match("Gecko"))
-// {
-// c=e.which;
-// }
-// else
-// {
-// c=e.keyCode;
-// }
-// if(c==9)
-// {
-// replaceSelection(item,String.fromCharCode(9));
-// setTimeout("document.getElementById('"+item.id+"').focus();",0);
-// return false;
-// }
-// }
-
-// var lineObjOffsetTop = 0;
-
-// function addLineNumbers(id)
-// {
-// var el = document.createElement('DIV');
-// var ta = document.getElementById(id);
-// var content = document.getElementById('snippet').value;
-// ta.parentNode.insertBefore(el,ta);
-// el.appendChild(ta);
-// el.style.width = (ta.offsetWidth + 30) + 'px';
-// ta.style.position = 'absolute';
-// ta.style.left = '30px';
-// ta.scrollHeight=""
-// el.style.border = 'none';
-// el.style.overflow='hidden';
-// el.style.position = 'relative';
-// el.style.width = (ta.offsetWidth + 30) + 'px';
-// var lineObj = document.createElement('DIV');
-// lineObj.style.position = 'absolute';
-// lineObj.style.top = lineObjOffsetTop + 'px';
-// lineObj.style.width = '27px';
-// lineObj.style.fontSize= '18px';
-// lineObj.style.foregroundColor='black';
-// el.insertBefore(lineObj,ta);
-// lineObj.style.textAlign = 'right';
-// lineObj.className='lineObj';
-// var string = '';
-// split_content = content.split('\n');
-// if(id == "answer")
-// {
-// el.className='AnswerWithLines';
-// el.id='AnswerWithLines';
-// el.style.height = (ta.scrollHeight) + 'px';
-// for(var no=split_content.length+1;no<1000;no++)
-// {
-// if(string.length>0)string = string + '<br>';
-// string = string + no;
-// }
-// }
-// else
-// {
-// el.className='SnippetWithLines';
-// el.id='SnippetWithLines';
-// el.style.height = (ta.scrollHeight) + 'px';
-// for(var no=1;no<=split_content.length;no++)
-// {
-// if(string.length>0)string = string + '<br>';
-// string = string + no;
-// }
-// }
-// ta.onmousedown = function() { positionLineObj(lineObj,ta); };
-// ta.onscroll = function() { positionLineObj(lineObj,ta); };
-// ta.onblur = function() { positionLineObj(lineObj,ta); };
-// ta.onfocus = function() { positionLineObj(lineObj,ta); };
-// ta.onmouseover = function() { positionLineObj(lineObj,ta); };
-// ta.onkeyup = function(){autoresize();};
-// lineObj.innerHTML = string;
-// }
-
-// function positionLineObj(obj,ta)
-// {
-// obj.style.top = (ta.scrollTop * -1 + lineObjOffsetTop) + 'px';
-// }