-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
299 lines (290 loc) · 12.6 KB
/
index.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="resources/css/style.css">
<script src="resources/js/jquery-1.6.js" type="text/javascript"></script>
<!-- <script src="resources/js/allObject.js" type="text/javascript"></script> -->
<script src="resources/js/saveObject.js" type="text/javascript"></script>
<script src="resources/js/Replay.js" type="text/javascript"></script>
<script src="resources/js/jscolor.js" type="text/javascript"></script>
<script src="resources/js/jvslider.js" type="text/javascript"></script>
<script src="resources/js/socket_io.js" type="text/javascript"></script>
<script type="text/javascript">
//页面提醒显示js代码
function mouseover(obj)
{
obj="#tishi"+obj;
$(obj).css("display","block");
}
function mouseout(obj)
{
obj="#tishi"+obj;
$(obj).css("display","none");
}
function mouseover1(obj)
{
obj="#zuospan"+obj;
$(obj).css("display","block");
}
function mouseout1(obj)
{
obj="#zuospan"+obj;
$(obj).css("display","none");
}
/*以下代码是点击录制的代码*/
var isRecord = false;
function record()
{
if(isRecord)
{
$("#recordImg").attr("src","./resources/photo/zanting.png");
$("#reState").text("点击录制");
isRecord = false;
var date =new Date();
var opTime = date.getTime();
var opId = "'opId':'end'";
opTime = "'opTime':"+"'"+opTime+"'";
var dataEvent = "[{"+opId+","+opTime+"}]";
iosocket.send(dataEvent);
var filename = prompt("请输入你想要保存的文件名:");
window.location.href="/save?filename="+filename;
}
else
{
$("#recordImg").attr("src","./resources/photo/luzhi.png");
$("#reState").text("正在录制...");
isRecord = true;
var date =new Date();
var opTime = date.getTime();
var opId = "'opId':'begin'";
opTime = "'opTime':"+"'"+opTime+"'";
var dataEvent = "[{"+opId+","+opTime+"}]";
iosocket.send(dataEvent);
$.get("/begin", function(result){
alert(result);
});
}
}
</script>
</head>
<body>
<a href="javascript:void(0);" onclick="record();"><img src="./resources/photo/zanting.png" id="recordImg"/></a><label id="reState">点击录制</label>
<a href="/showFiles"><img src="./resources/photo/zanting.png" id="recordImg"/></a><label id="reState">播放已经录制的视频</label>
<div class="container">
<div class="namediv"><img alt="logo" src="resources/photo/logo.png" style="width: 35px; height: 30px;">
</div>
<div class="tooldiv">
<ul>
<li><img src="resources/photo/baocun.png" onmouseover="mouseover(1);" onmouseout="mouseout(1);" style="cursor:pointer;" id="save">
<span class="tishi" id="tishi1">保存</span>
</li>
<li> <label>T </label>
<select style="height: 26px;" id="font_family">
<option>宋体</option>
<option>黑体</option>
<option>微软雅黑</option>
<option>新宋体</option>
<option>新细明体</option>
<option>仿宋</option>
<option>楷体</option>
<option>仿宋_GB2312</option>
<option>楷体_GB2312</option>
<option>cursive</option>
<option>fantasy</option>
<option>monospace</option>
</select>
</li>
<li>size
<select style="height: 26px;" id="font_size" >
<option>16</option>
<option>18</option>
<option>20</option>
<option>22</option>
<option>24</option>
<option>26</option>
<option>28</option>
<option>30</option>
<option>32</option>
<option>34</option>
<option>36</option>
<option>38</option>
<option>40</option>
<option>42</option>
<option>44</option>
<option>46</option>
<option>48</option>
<option>50</option>
<option>52</option>
<option>54</option>
<option>56</option>
<option>58</option>
<option>60</option>
<option>62</option>
<option>64</option>
<option>66</option>
<option>68</option>
<option>70</option>
<option>72</option>
<option>74</option>
<option>76</option>
<option>78</option>
<option>80</option>
</select>
</li>
<li style="padding-top: 2px;">
<img src="resources/photo/color.jpg" onmouseover="mouseover(6);" onmouseout="mouseout(6);">
<span class="tishi" id="tishi6">颜色</span>
</li>
<li><input class="color" id="color" value="000000"/></li>
<li><input type="checkbox" value="" id="edit" name="edit"/>编辑</li>
<li><input type="text" id="editText"/></li>
</ul>
</div>
<div class="contentdiv">
<div class="stylediv">
<ul>
<li><span class="zuospan" id="zuospan1">粉笔</span>
<a href="javascript:void(0);" onmouseover="mouseover1(1);" onmouseout="mouseout1(1);" id="fenbi" >
<img alt="bi" src="resources/photo/fenbi.jpg">
</a>
</li>
<li><span class="zuospan" id="zuospan2">直线</span>
<a href="javascript:void(0);" onmouseover="mouseover1(2);" onmouseout="mouseout1(2);" id="zhixian">
<img alt="zhixian" src="resources/photo/zhixian.jpg">
</a>
</li>
<li><span class="zuospan" id="zuospan3">矩形</span>
<a href="#" onmouseover="mouseover1(3);" onmouseout="mouseout1(3);" id="juxing">
<img alt="juxing" src="resources/photo/juxing.jpg">
</a>
<div id="showRect">
<span class="zuospan" id="zuospan9">空心矩形</span>
<a href="#" onmouseover="mouseover1(9);" onmouseout="mouseout1(9);" id="kongjuxing" style="margin-left:20px;">
<img alt="juxing" src="resources/photo/juxing.jpg">
</a>
<span class="zuospan" id="zuospan10">实心矩形</span>
<a href="#" onmouseover="mouseover1(10);" onmouseout="mouseout1(10);" id="shijuxing">
<img alt="juxing" src="resources/photo/juxing.jpg">
</a>
</div>
</li>
<li><span class="zuospan" id="zuospan4">圆形</span>
<a href="#" onmouseover="mouseover1(4);" onmouseout="mouseout1(4);" id="yuanxing">
<img alt="yuan" src="resources/photo/yuan.jpg">
</a>
<div id="showRect1">
<span class="zuospan" id="zuospan11">空心圆形</span>
<a href="#" onmouseover="mouseover1(11);" onmouseout="mouseout1(11);" id="kongyuan" style="margin-left:20px;">
<img alt="yuan" src="resources/photo/yuan.jpg">
</a>
<span class="zuospan" id="zuospan12">实心圆形</span>
<a href="#" onmouseover="mouseover1(12);" onmouseout="mouseout1(12);" id="shiyuan">
<img alt="yuan" src="resources/photo/yuan.jpg">
</a>
</div>
</li>
<li><span class="zuospan" id="zuospan6">三角形</span>
<a href="#" onmouseover="mouseover1(6);" onmouseout="mouseout1(6);" id="sanjiaoxing">
<img alt="sanjiaoxing" src="resources/photo/sanjiaoxing.jpg">
</a>
<div id="showRect2">
<span class="zuospan" id="zuospan13">空三角形</span>
<a href="#" onmouseover="mouseover1(13);" onmouseout="mouseout1(13);" id="kongsan" style="margin-left:20px;">
<img alt="yuan" src="resources/photo/sanjiaoxing.jpg">
</a>
<span class="zuospan" id="zuospan14">实三角形</span>
<a href="#" onmouseover="mouseover1(14);" onmouseout="mouseout1(14);" id="shisan">
<img alt="yuan" src="resources/photo/sanjiaoxing.jpg">
</a>
</div>
</li>
<li><span class="zuospan" id="zuospan8">曲线</span>
<a href="#" onmouseover="mouseover1(8);" onmouseout="mouseout1(8);" id="quxian">
<img alt="曲线" src="resources/photo/quxian.jpg">
</a>
</li>
<li><span class="zuospan" id="zuospan5">橡皮檫</span>
<a href="#" onmouseover="mouseover1(5);" onmouseout="mouseout1(5);" id="xiangpica">
<img alt="xiangpicha" src="resources/photo/xiangpicha.jpg">
</a>
<div id="showInfo">
大小:<div id="slider"></div><label id="slidertext">16</label>
<script type="text/javascript">
$('#slider').jvslider({
vertical: false,
width: 100,
barHeight: 10,
barBorder: 1,
barBorderColor: '#aaa',
barRadius: 2,
barBackground: '#fff',
handleWidth: 10,
handleHeight: 12,
handleBorder: 1,
handleBorderColor: '#aaa',
handleRadius: 2,
handleBackground: '#fff',
handleDownBackground: '#eee',
processBackground: '#fc6',
percent: 16,
slide: function(percent){
//为了保证是偶数
if(percent%2 != 0)
{
percent=percent+1;
}
$('#slidertext').html(percent);
ERASER_WIDTH = percent;
},
click: function(percent){
//保证是偶数
if(percent%2 != 0)
{
percent=percent+1;
}
$('#slidertext').html(percent);
ERASER_WIDTH = percent;
}
});
//参数(全部为可选项)说明:
//vertical: 是否使用纵向滑动条,默认false
//width: 滑动区域宽度
//barHeight: 滑动区域高度
//barBorder: 滑动区域边框宽度
//barBorderColor: 滑动区域边框颜色
//barRadius: 滑动区域圆角
//barBackground: 滑动区域背景
//handleWidth: 滑块宽度
//handleHeight: 滑块高度
//handleBorder: 滑块边框宽度
//handleBorderColor: 滑块边框颜色
//handleRadius: 滑块圆角
//handleBackground: 滑块背景
//handleDownBackground: 滑块点击时北京
//processBackground: 进度条背景
//percent: 起始百分比
//slide: 滑块滑动时调用程序
//click: 点击滑动区域时调用程序
</script>
</div>
</li>
<li><span class="zuospan" id="zuospan7">文字</span>
<a href="#" onmouseover="mouseover1(7);" onmouseout="mouseout1(7);" id="wenzi">
<img alt="zi" src="resources/photo/zi.jpg">
</a>
<div id="Drigging" class="textDiv"><textarea class="textDiv" id="myText">请输入文字...输入完文字按shift+enter</textarea></div>
</li>
</ul>
</div>
<div style="display:inline; float:right; width:94%; height:100%;">
<canvas id="mycanvas" width="865" height="478"></canvas>
<script src="resources/js/main.js"></script>
</div>
</div>
</div>
</body>
</html>
<body>
</body>
</html>