diff --git a/templates/dogfood.html b/templates/dogfood.html index ce1157d3b6..178360e75b 100644 --- a/templates/dogfood.html +++ b/templates/dogfood.html @@ -105,6 +105,10 @@ ## image input: for clicking on images (see imageinput.html) + + <%block name="js_extra"/> diff --git a/templates/main.html b/templates/main.html index 6e336ab0ad..a87424f51b 100644 --- a/templates/main.html +++ b/templates/main.html @@ -131,6 +131,10 @@ + + <%block name="js_extra"/> diff --git a/templates/problem.js b/templates/problem.js index 30b68daafe..c34c5d92e4 100644 --- a/templates/problem.js +++ b/templates/problem.js @@ -15,10 +15,6 @@ function ${ id }_content_updated() { }; }); -// for (var key in codemirror_set) { -// codemirror_set[key].refresh(); -// } - $('#check_${ id }').unbind('click').click(function() { $("input.schematic").each(function(index,element){ element.schematic.update_value(); }); $(".CodeMirror").each(function(index,element){ if (element.CodeMirror.save) element.CodeMirror.save(); }); @@ -67,7 +63,8 @@ function ${ id }_content_updated() { break; default: alert(json.success); - }} + } + } ); log_event('problem_check', submit_data); }); @@ -100,6 +97,10 @@ function ${ id }_content_updated() { } }); + for (var key in codemirror_set) { + codemirror_set[key].refresh(); + } + log_event('problem_show', {'problem':'${ id }'}); }); diff --git a/templates/textbox.html b/templates/textbox.html index bbe6476746..e6c147141c 100644 --- a/templates/textbox.html +++ b/templates/textbox.html @@ -30,7 +30,7 @@ $(function(){ % endif }); cm.refresh(); - // codemirror_set["${id}"] = cm; // track it for refreshes + codemirror_set["${id}"] = cm; // track it for refreshes });