Commit fc4d4c82 by Prem Sichanugrist

Fix section convention and code highlight

parent 5eac6ffa
<section class="text-input"> <section id="jstextline_${id}" class="jstextline">
<input type="text" name="input_${id}" id="input_${id}" value="${value}" <input type="text" name="input_${id}" id="input_${id}" value="${value}"
% if size: % if size:
size="${size}" size="${size}"
......
<section class="text-input"> <section id="textbox_${id}" class="textbox">
<textarea rows="30" cols="80" name="input_${id}" id="input_${id}">${value|h}</textarea> <textarea rows="30" cols="80" name="input_${id}" id="input_${id}">${value|h}</textarea>
<span id="answer_${id}"></span> <span id="answer_${id}"></span>
...@@ -18,17 +18,21 @@ ...@@ -18,17 +18,21 @@
<span class="debug">${msg|n}</span> <span class="debug">${msg|n}</span>
<br/> <br/>
<br/> <br/>
<script>
// Note: We need to make the area follow the CodeMirror for this to <script type="text/javascript" src="${ settings.LIB_URL }CodeMirror/codemirror.js"></script>
// work. <script type="text/javascript" src="${ settings.LIB_URL }CodeMirror/python.js"></script>
$(function(){ <link rel="stylesheet" href="${ settings.LIB_URL }CodeMirror/codemirror.css" />
var cm = CodeMirror.fromTextArea(document.getElementById("input_${id}"), <script>
{'mode':"python"}); // Note: We need to make the area follow the CodeMirror for this to work.
}); $(function(){
</script> var cm = CodeMirror.fromTextArea(document.getElementById("input_${id}"), {
<style type="text/css"> mode: "python"
});
});
</script>
<style type="text/css">
.CodeMirror {border-style: solid; .CodeMirror {border-style: solid;
border-width: 1px;} border-width: 1px;}
</style> </style>
</section> </section>
<section class="text-input"> <section id="textinput_${id}" class="textinput">
<input type="text" name="input_${id}" id="input_${id}" value="${value}" <input type="text" name="input_${id}" id="input_${id}" value="${value}"
% if size: % if size:
size="${size}" size="${size}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment