-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.html
242 lines (239 loc) · 14 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>南京理工大学程序设计能力评测系统题目打包程序</title>
<link rel="stylesheet" type="text/css" href="static/css/base.css"/>
<link rel="stylesheet" type="text/css" href="static/css/step.css"/>
<link rel="stylesheet" type="text/css" href="static/css/codemirror.css"/>
<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="static/css/pnotify.custom.min.css"/>
</head>
<body>
<div class = "body-container">
<div class="dHead">
<div class="six steps large step-navbar">
<span name = "stepBtn" class="step active">开始</span>
<span name = "stepBtn" class="step">题目基本信息</span>
<span name = "stepBtn" class="step">编辑题目内容</span>
<span name = "stepBtn" class="step">添加测试用例</span>
<span name = "stepBtn" class="step">添加题解</span>
<span name = "stepBtn" class="step">完成确认</span>
</div>
<div id="problem_edit_bar" class="problemEditBar hidden">
<div id="nic_panel"></div>
</div>
</div>
<div class="dBody">
<div name="stepDiv" id="step0">
<div class="col-md-8 col-md-offset-2">
<div class="subhead">欢迎使用</div>
<div class="startPageText">
您可以从下面三个功能中任选一个来开始:
<ol>
<li>创建新题目:从零开始创建一个新的题目.</li>
<li>上传压缩包:上传一个已经存在的题目压缩包并重新编辑.</li>
<!-- <li>恢复上次数据:将上次未来的及保存的数据恢复(程序默认每30秒备份一次, 当然您也可以随时点击保存按钮保存当前数据). -->
<li>重置该程序:当程序发生错误并且重启无效时,可以通过此按钮来恢复( 注意:这会使得当前程序中的所有数据丢失).</li>
</ol>
</div>
<div class="startPageBtn">
<div class="btn-group">
<button class="btn btn-default bigBtn" id="newBtn" data-toggle="tooltip" data-placement="bottom" title="创建新题目"><span class="glyphicon glyphicon-plus bigico"></span></button>
</div>
<div class="btn-group">
<span class="btn btn-default bigBtn" id="proUploadSpan" data-toggle="tooltip" data-placement="bottom" title="上传压缩包">
<span class="glyphicon glyphicon-open bigico" aria-hidden="true"></span>
</span>
<input type="file" accept=".zip" id="proUploadBtn" style="display: none"/>
</div>
<div class="btn-group hidden">
<button class="btn btn-default bigBtn" id="restoreBtn" data-toggle="tooltip" data-placement="bottom" title="还原上次数据"><span class="glyphicon glyphicon-repeat bigico"></span></button>
</div>
<div class="btn-group">
<button class="btn btn-default bigBtn" id="reset" data-toggle="tooltip" data-placement="bottom" title="重置该程序"><span class="glyphicon glyphicon-refresh bigico"></span></button>
</div>
</div>
</div>
</div>
<div name="stepDiv" id="step1" class="hidden">
<div class="col-md-4 col-md-offset-4">
<div class="subhead">题目基本信息</div>
<div class="form-group">
<label>标题</label>
<input type="text" class="form-control" id="title" placeholder="请输入题目的标题">
</div>
<div class="form-group">
<label>时间限制(MS)</label>
<input type="text" class="form-control" id="timelimit" placeholder="请输入时间限制">
</div>
<div class="form-group">
<label>内存限制(KB)</label>
<input type="text" class="form-control" id="memorylimit" placeholder="请输入内存限制">
</div>
<div class="form-group">
<label>题目难度</label>
<select class="form-control" title="选择题目难度" id="proLevel">
<option name="problem_level" id="prolevel" autocomplete="off" value="1">简单</option>
<option name="problem_level" id="prolevel" autocomplete="off" value="2">较简单</option>
<option name="problem_level" id="prolevel" autocomplete="off" value="3">一般</option>
<option name="problem_level" id="prolevel" autocomplete="off" value="4">较难</option>
<option name="problem_level" id="prolevel" autocomplete="off" value="5">难</option>
</select>
</div>
</div>
</div>
<div name="stepDiv" id="step2" class="hidden">
<div class="subhead">编辑题目内容</div>
<div id="problem_description">
<h3 class="problemItem">题目描述</h3>
<div class="desc_text" id="description_text"></div>
</div>
<div id="problem_input">
<h3 class="problemItem">输入描述</h3>
<div class="desc_text" id="inputdescription_text"></div>
</div>
<div id="problem_output">
<h3 class="problemItem">输出描述</h3>
<div class="desc_text" id="outputdescription_text"></div>
</div>
<div id="problem_sampleinput">
<h3 class="problemItem">输入样例</h3>
<div class="desc_text" id="inputsample_text"></div>
</div>
<div id="problem_sampleoutput">
<h3 class="problemItem">输出样例</h3>
<div class="desc_text" id="outputsample_text"></div>
</div>
<div id="problem_hint">
<h3 class="problemItem">解答提示</h3>
<div class="desc_text" id="hint_text"></div>
</div>
<div id="problem_source">
<h3 class="problemItem">来源(作者)</h3>
<div class="desc_text" id="source_text"></div>
</div>
</div>
<div name="stepDiv" id="step3" class="hidden">
<div class="col-md-6 col-md-offset-3">
<div class="subhead">添加测试用例</div>
<div class="pull-right">
<span class="btn btn-default fileinput-button" id="dataUploadSpan">
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"> 选择文件夹</span>
<input id="dataUploadBtn" type="file" nwdirectory />
</span>
</div>
<table id="testCaseTable" class="table table-hover hidden">
<thead>
<tr>
<th>编号</th>
<th>输入数据文件</th>
<th>输出数据文件</th>
<th>测试用例分值</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div name="stepDiv" id="step4" class="hidden">
<div class="subhead">添加题解</div>
<div class="btn-group compiler">
<label class="lblcode">编程语言</label>
<br/>
<select class="form-control compiler" id="compiler" name="compiler">
<option name="compiler_select" value="c">C语言</option>
<option name="compiler_select" value="cpp">C++语言</option>
<option name="compiler_select" value="java">JAVA语言</option>
</select>
</div> <br/><br/>
<div class="col-md-7">
<label class="lblcode">参考程序</label>
<textarea id="code"></textarea>
</div>
<div class="col-md-5">
<label class="lblcode">解题思路</label>
<textarea class="form-control" id="solution" rows="35"></textarea>
</div>
</div>
<div name="stepDiv" id="step5" class="hidden">
<div class="col-md-8 col-md-offset-2">
<div class="subhead">完成确认</div>
<ol class="startPageText">
<li>如果您已填写了之前的所有项目并且确定填写正确, 您可以单击下方的下载题目信息按钮来下载题目压缩包</li>
<li>当然, 在您单击按钮之后, 我们会对您之前的工作做一个校验, 但是类似题目内容和参考题解这类的信息, 我们无法校验, 还请您注意检查</li>
<li>当您的测试文件数据量很大时生成压缩包的时间会比较长, 请您耐心等待</li>
</ol>
<div id="hintDiv" class="alert alert-dismissable alert-warning hidden">
<strong>提醒: </strong>您可以单击重新开始一道新的题目按钮来编辑一道新的题目, 但是这会导致您当前的编辑信息丢失, 请您在确定已经成功下载题目信息压缩包后再点击.
</div>
<br/>
<div class="endPageBtn">
<div class="btn-group">
<span class="btn btn-default bigBtn" id="downloadBtn" data-toggle="tooltip" data-placement="bottom" title="下载题目信息">
<span class="glyphicon glyphicon-download-alt bigico" aria-hidden="true"></span>
</span>
<input type="file" nwsaveas="problem.zip" accept=".zip" id="saveProBtn" style="display: none"/>
</div>
<div class="btn-group hidden" id="repeatDiv">
<button class="btn btn-default bigBtn" id="repeatBtn" data-toggle="tooltip" data-placement="bottom" title="重新开始一道新的题目"><span class="glyphicon glyphicon-plus bigico" aria-hidden="true"></span></button>
</div>
</div> <br/>
</div>
</div>
</div>
<div class="dBtn">
<div class="preStepBtn hidden" id="preStepBtn">
<button class="btn btn-success" role="button" id="preBtn"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true">上一步</span></button>
</div>
<div class="previewStepBtn hidden" id="previewStepBtn">
<button class="btn btn-default" id="previewBtn">预览 <span class="glyphicon glyphicon glyphicon-new-window" aria-hidden="true"></span></button>
</div>
<div class="saveStepBtn hidden" id="saveStepBtn">
<button class="btn btn-info" id="saveBtn">保存 <span class="glyphicon glyphicon glyphicon-floppy-save" aria-hidden="true"></span></button>
</div>
<div class="nextStepBtn" id="nextStepBtn">
<button class="btn btn-success" role="button" id="nextBtn">下一步<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></button>
</div>
</div>
</div>
<div id="pop_bar">
<ul class="dropdown-menu" id="pop_bar_list">
<li><a href="javascript:;" id="instrucBtn">使用说明</a></li>
<li><a href="javascript:;" id="helpPageBtn">出题说明</a></li>
<li role="presentation" class="divider"></li>
<li><a href="javascript:;" id="aboutBtn">关于</a></li>
</ul>
<a class="dropdown-toggle" id="pop_button" data-toggle="dropdown" href="#"><div ></div></a>
</div>
</body>
<script src="static/js/libs/jquery-1.11.0.min.js"></script>
<script src="static/js/libs/bootstrap.min.js"></script>
<script src="static/js/tools/nicedit.js"></script>
<script src="static/js/tools/CodeMirror/codemirror.js"></script>
<script src="static/js/tools/CodeMirror/active-line.js"></script>
<script src="static/js/tools/CodeMirror/clike.js"></script>
<script src="static/js/tools/jquery.nicescroll.min.js"></script>
<script src="static/js/tools/pnotify.custom.min.js"></script>
<script src="static/js/modules/app.js"></script>
<script src="static/js/modules/config.js"></script>
<script src="static/js/modules/filemanager.js"></script>
<script src="static/js/modules/pnotifyservice.js"></script>
<script src="static/js/main.js"></script>
<script>
function startMain(){
initAll();
}
bkLib.onDomLoaded(function() {
startMain();
var myNicEditor = new nicEditor({fullPanel : true,iconsPath:"static/images/nicEditorIcons.gif"});
myNicEditor.setPanel('nic_panel');
edits = ["description","inputdescription","outputdescription","inputsample","outputsample","hint","source"]
for (i in edits){
myNicEditor.addInstance(edits[i]+"_text");
}
});
</script>
</html>