-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsubanntator.html
322 lines (300 loc) · 11.4 KB
/
subanntator.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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Color theme for statusbar -->
<meta name="theme-color" content="#000">
<!-- Your app title -->
<title>批注系统</title>
<!-- Path to Framework7 Library CSS -->
<link rel="stylesheet" href="css/framework7.css">
<link rel="stylesheet" href="css/framework7-icons.css">
<link rel="stylesheet" href="css/style.css">
<style>
.ios .searchbar:after {
background-color: white;
}
.ios .card {
margin: 0.5rem 0 0 0;
}
.ios .navbar .left {
margin-right: 0px;
}
.ios .navbar b,
.ios .navbar .title {
font-weight: 500;
}
p {
font-size: 16px;
line-height: 1.5rem;
}
.ios .navbar .title {
font-size: 16px;
}
.ios .media-list .item-title,
.ios li.media-item .item-title {
font-weight: 500;
}
</style>
</head>
<body>
<!-- App root element -->
<div id="app">
<!-- 左侧边栏 -->
<div class="panel panel-left panel-cover anpanel annotator">
<div class="block" id="Mynote">
<div id="ancontent">
<div class="texbg">暂无批注</div>
</div>
</div>
</div>
<!-- Statusbar overlay -->
<!-- Your main view, should have "view-main" class -->
<div class="view view-main">
<!-- Initial Page, "data-name" contains page name -->
<!-- 头部标题栏 -->
<div class="navbar">
<div class="navbar-inner">
<div class="left">
<a href="#" class="item-link icon" id="back">
<i class="icon f7-icons" style="font-size: 25px">chevron_left</i>
</a>
</div>
<div class="title">
<span id="title"></span>
<div class="stitle">
<span id="count"></span>
<i class="icon f7-icons more">right</i>
</div>
</div>
<div class="right">
</div>
</div>
</div>
<!-- 工具栏 -->
<div class="toolbar tabbar-labels">
<div class="toolbar-inner">
<!-- 工具栏标签 -->
<a href="#" class="tab-link an-button popup-open" data-popup=".popup0" id="button0">
<!-- Different icons for iOS and MD themes -->
<i class="icon f7-icons ios-only">chat_fill</i>
<span class="tabbar-label">背景高亮</span>
</a>
<a href="#" class="tab-link an-button popup-open" data-popup=".popup1" id="button1">
<i class="icon f7-icons ios-only">help_fill</i>
<span class="tabbar-label">文字高亮</span>
</a>
<a href="#" class="tab-link an-button popup-open" data-popup=".popup2" id="button2">
<i class="icon f7-icons ios-only">heart_fill</i>
<span class="tabbar-label">加粗</span>
</a>
<a href="#" class="tab-link an-button popup-open" data-popup=".popup3" id="button3">
<i class="icon f7-icons ios-only">mic_fill</i>
<span class="tabbar-label">下划线</span>
</a>
<!-- <a href="#" class="tab-link an-button popup-open" data-popup=".popup4" id="button4">
<i class="icon f7-icons ios-only">compose_fill</i>
<span class="tabbar-label">补充</span>
</a> -->
<a href="#" class="tab-link an-button open-confirm" id="button5">
<i class="icon f7-icons ios-only" style="color: #f08b00">check_round_fill </i>
<span class="tabbar-label">提交</span>
</a>
</div>
</div>
<!-- 内容区域 -->
<div class="page-content">
<div class="list media-list annotator">
<ul>
<li>
<a href="#" class="item-link item-content class">
<div class="item-media">
<img src="images/teacher.jpg" width="44" />
</div>
<div class="item-inner">
<div class="item-title">
<div class="item-title size-14" id="person">发布人:张晓飞老师</div>
</div>
<div class="item-subtitle size-14">教育工作者</div>
</div>
</a>
</li>
</ul>
</div>
<div id="txblock">
<div class="block" id="box" style="color:black"></div>
</div>
</div>
<!-- 弹出页面 -->
<div class="popup popup5 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">help_fill</i> 修改批注</p>
<blockquote class="blockquote bqcolor1" id="bqcolor">
<p id="old"></p>
<p id="sendID" style="display: none"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="mod" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="modadd">修改批注</button>
<button class="button col-30 popup-close">取消</button>
</p>
</div>
</div>
<div class="popup popup0 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">chat_fill</i> 添加批注</p>
<blockquote class="blockquote bqcolor0">
<p id="selectedtxt0" class="text_overflow3"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="note0" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="add0">添加批注</button>
<button class="button col-30 popup-close" onclick="getPassage()">取消</button>
</p>
</div>
</div>
<div class="popup popup1 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">help_fill</i> 添加批注</p>
<blockquote class="blockquote bqcolor1">
<p id="selectedtxt1" class="text_overflow3"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="note1" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="add1">添加批注</button>
<button class="button col-30 popup-close" onclick="getPassage()">取消</button>
</p>
</div>
</div>
<div class="popup popup2 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">heart_fill</i> 添加批注</p>
<blockquote class="blockquote bqcolor2">
<p id="selectedtxt2" class="text_overflow3"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="note2" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="add2">添加批注</button>
<button class="button col-30 popup-close" onclick="getPassage()">取消</button>
</p>
</div>
</div>
<div class="popup popup3 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">mic_fill</i> 添加批注</p>
<blockquote class="blockquote bqcolor3">
<p id="selectedtxt3" class="text_overflow3"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="note3" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="add3">添加批注</button>
<button class="button col-30 popup-close" onclick="getPassage()">取消</button>
</p>
</div>
</div>
<div class="popup popup4 annotator">
<div class="block annotator">
<p>
<i class="icon f7-icons ios-only">compose_fill</i> 添加批注</p>
<blockquote class="blockquote bqcolor4">
<p id="selectedtxt4" class="text_overflow3"></p>
</blockquote>
<p class="content">
<i class="icon f7-icons ios-only">bookmark_fill</i> 批注内容</p>
<!-- Close Popup -->
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<textarea placeholder="请输入批注" id="note4" cols="45" rows="6" class="textarea"></textarea>
<p class="row">
<button class="col-30 button button-fill panel-open popup-close" id="add4">添加批注</button>
<button class="button col-30 popup-close" onclick="getPassage()">取消</button>
</p>
</div>
</div>
</div>
</div>
<script src="js/framework7.min.js"></script>
<script src="js/app.js"></script>
<script src="js/rangy-core.js"></script>
<script src="js/rangy-classapplier.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/annotate.js"></script>
<script>
var user = 1;
$$('.open-confirm').on('click', function () {
if (ancount < 5) {
app.dialog.confirm('您的批注内容过少,是否提交?', function () {
submit();
});
} else {
submit();
}
});
// 返回按钮
var back = document.getElementById("back");
if (back) {
back.addEventListener('touchstart', function () {
window.history.back(-1);
})
};
function submit() {
$.ajax({
url: 'http://212.64.11.56:8080/EAnnotation/setFinish?studentId=' + localStorage.id + '&passageId=' + passageId +
'&classId=' + localStorage.classid + '',
type: "POST",
success:function () {
app.dialog.create({
text: '提交成功',
buttons: [{
text: '确定',
onClick: function () {
window.history.back(-1)
}
}],
verticalButtons: true,
}).open();
}
})
}
</script>
</body>
</html>