Move function out of compressor

This commit is contained in:
cuom1999 2023-07-25 22:49:50 +07:00
parent 2116dda86b
commit ec7f5a2047
2 changed files with 31 additions and 30 deletions

View file

@ -26,7 +26,7 @@ pyotp
qrcode[pil] qrcode[pil]
jsonfield @ git+https://github.com/DMOJ/jsonfield.git jsonfield @ git+https://github.com/DMOJ/jsonfield.git
pymoss pymoss
packaging packaging<23
celery celery
ansi2html @ git+https://github.com/DMOJ/ansi2html.git ansi2html @ git+https://github.com/DMOJ/ansi2html.git
sqlparse sqlparse

View file

@ -3,16 +3,7 @@
{% block js_media %} {% block js_media %}
<script type="text/javascript" src="{{ ACE_URL }}/ace.js"></script> <script type="text/javascript" src="{{ ACE_URL }}/ace.js"></script>
{{ form.media.js }} {{ form.media.js }}
{% compress js %}
<script type="text/javascript"> <script type="text/javascript">
$(function () {
function format(state) {
if (!state.id) return state.text; // optgroup
return state.text;
}
window.previous_template = '';
function update_submit_area(code) { function update_submit_area(code) {
window.previous_template = code; window.previous_template = code;
$('textarea#id_source').val(code); $('textarea#id_source').val(code);
@ -41,6 +32,16 @@
} }
{% endif %} {% endif %}
} }
</script>
{% compress js %}
<script type="text/javascript">
$(function () {
function format(state) {
if (!state.id) return state.text; // optgroup
return state.text;
}
window.previous_template = '';
function makeDisplayData(data) { function makeDisplayData(data) {
var site_data = data.attr('data-info'); var site_data = data.attr('data-info');