修改 js 的命名风格
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
<h2 class="text-center">{{ problem.title }}</h2>
|
||||
|
||||
<p class="text-muted text-center">发布时间 : {{ problem.create_time }}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{% extends 'oj_base.html' %}
|
||||
{% block css_block %}
|
||||
<style>
|
||||
.CodeMirror{
|
||||
height: auto;
|
||||
}
|
||||
.CodeMirror {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
@@ -29,7 +29,7 @@
|
||||
{% ifequal submission.result 4 %}
|
||||
<p>{{ submission.info }}</p>
|
||||
{% endifequal %}
|
||||
<p>提交时间 : {{ submission.create_time }}</p>
|
||||
<p>提交时间 : {{ submission.create_time }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="code-field">
|
||||
@@ -40,7 +40,7 @@
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script>
|
||||
require(["jquery", "code_mirror"], function ($, code_mirror) {
|
||||
require(["jquery", "codeMirror"], function ($, codeMirror) {
|
||||
{% ifequal submission.language 1 %}
|
||||
var language = "text/x-csrc";
|
||||
{% else %}
|
||||
@@ -50,8 +50,8 @@
|
||||
var language = "text/x-java";
|
||||
{% endifequal %}
|
||||
{% endifequal %}
|
||||
var code_editor = code_mirror($("#code-editor")[0], language);
|
||||
code_editor.setOption("readOnly", true);
|
||||
var codeEditor = codeMirror($("#code-editor")[0], language);
|
||||
codeEditor.setOption("readOnly", true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
<div style="float: right;">
|
||||
<div class="search-box">
|
||||
<form class="form-inline" onsubmit="return false;">
|
||||
<div class="form-group-sm">
|
||||
<input name="keyWord" class="form-control" placeholder="请输入关键词" ms-duplex="key_word">
|
||||
@@ -28,7 +28,7 @@
|
||||
{% for item in problems %}
|
||||
<tr>
|
||||
<th scope="row"><a href="/problem/{{ item.id }}/">{{ item.id }}</a></th>
|
||||
<td><a href="/problem/1/">{{ item.title }}</a></td>
|
||||
<td><a href="/problem/{{ item.id }}/">{{ item.title }}</a></td>
|
||||
<td>{{ item.difficulty }}</td>
|
||||
<td>{{ item|accepted_radio }}</td>
|
||||
</tr>
|
||||
@@ -38,11 +38,13 @@
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if previous_page %}
|
||||
<li class="previous"><a href="/problems/{{ previous_page }}/"><span
|
||||
aria-hidden="true">←</span> 上一页</a></li>
|
||||
<li class="previous"><a
|
||||
href="/problems/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">
|
||||
<span aria-hidden="true">←</span> 上一页</a></li>
|
||||
{% endif %}
|
||||
{% if next_page %}
|
||||
<li class="next"><a href="/problems/{{ next_page }}/">下一页 <span
|
||||
<li class="next"><a
|
||||
href="/problems/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}{% if tag %}?tag={{ tag }}{% endif %}">下一页 <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user