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]
jsonfield @ git+https://github.com/DMOJ/jsonfield.git
pymoss
packaging
packaging<23
celery
ansi2html @ git+https://github.com/DMOJ/ansi2html.git
sqlparse

View file

@ -3,16 +3,7 @@
{% block js_media %}
<script type="text/javascript" src="{{ ACE_URL }}/ace.js"></script>
{{ form.media.js }}
{% compress js %}
<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) {
window.previous_template = code;
$('textarea#id_source').val(code);
@ -41,6 +32,16 @@
}
{% 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) {
var site_data = data.attr('data-info');