Commit 5d468e4e by Prem Sichanugrist

Fix code formatting

parent 53260aec
...@@ -2,15 +2,12 @@ ...@@ -2,15 +2,12 @@
### version of textline.html which does dynammic math ### version of textline.html which does dynammic math
### ###
<section class="text-input-dynamath"> <section class="text-input-dynamath">
<table style="display:inline; vertical-align:middle;"><tr><td> <table style="display:inline; vertical-align:middle;">
<input type="text" name="input_${id}" id="input_${id}" value="${value}" <tr>
% if size: <td>
size="${size}" <input type="text" name="input_${id}" id="input_${id}" value="${value}" size="${size if size else ''}" />
% endif </td>
onkeyup="DoUpdateMath('${id}')" <td>
/>
</td><td>
<span id="answer_${id}"></span> <span id="answer_${id}"></span>
% if state == 'unsubmitted': % if state == 'unsubmitted':
...@@ -22,18 +19,23 @@ ...@@ -22,18 +19,23 @@
% elif state == 'incomplete': % elif state == 'incomplete':
<span class="incorrect" id="status_${id}"></span> <span class="incorrect" id="status_${id}"></span>
% endif % endif
</td>
</td></tr><tr><td> </tr>
<tr>
<td>
<span id="display_${id}">`{::}`</span> <span id="display_${id}">`{::}`</span>
</td><td> </td>
<td>
<textarea style="display:none" id="input_${id}_dynamath" name="input_${id}_dynamath"> </textarea> <textarea style="display:none" id="input_${id}_dynamath" name="input_${id}_dynamath"> </textarea>
</td></tr> </td>
</tr>
</table> </table>
## ##
## javascript for dynamic math: add this math element to the MathJax rendering queue ## javascript for dynamic math: add this math element to the MathJax rendering queue
## also adds to global jaxset js array ## also adds to global jaxset js array
## ##
<script type="text/javascript"> <script type="text/javascript">
MathJax.Hub.queue.Push(function () { MathJax.Hub.queue.Push(function () {
math = MathJax.Hub.getAllJax("display_${id}")[0]; math = MathJax.Hub.getAllJax("display_${id}")[0];
if (math){ if (math){
...@@ -42,7 +44,8 @@ ...@@ -42,7 +44,8 @@
// UpdateMathML(math,"${id}"); // UpdateMathML(math,"${id}");
} }
}); });
</script> </script>
% if msg: % if msg:
<br/> <br/>
<span class="debug">${msg|n}</span> <span class="debug">${msg|n}</span>
......
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