算法评测平台前端。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
920 B

7 years ago
<% this.adminPage = 'raw'; %>
<% include admin_header %>
<form method="post">
7 years ago
<% include monaco-editor %>
<div id="editor" class="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; ">
<%- this.showLoadingEditor(); %>
</div>
7 years ago
<input type="hidden" name="data">
<script type="text/javascript">
var originalData = <%- serializejs(data) %>;
7 years ago
var input = $('[name="data"]');
input.val(originalData);
window.onEditorLoaded(function () {
var editor;
window.editor = editor = window.createCodeEditor(document.getElementById("editor"), "json", originalData);
$('form').on('submit', function () {
input.val(editor.getValue());
});
$('#submit_button').removeClass('disabled');
7 years ago
});
</script>
<div style="text-align: center; ">
<button id="submit_button" class="ui disabled blue labeled icon button"><i class="ui edit icon"></i>提交</button>
7 years ago
</div>
</form>
<% include admin_footer %>