瀏覽代碼

1.登录注册功能实现
2.添加评价、留言页面

luyanan 8 年之前
父節點
當前提交
d01b022c12

+ 1 - 1
src/main/webapp/css/common.css

@ -7,7 +7,7 @@
7 7
html, body{font:\5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";}
8 8
input{ outline:none;}
9 9
/*header部分*/
10
#header{width:100%;min-width:1170px; height:60px; background:rgba(255,132,0,1); position:fixed; top:0; z-index:9999; }
10
#header{width:100%;min-width:1170px; height:60px; background:rgba(255,132,0,1); position:fixed; top:0; z-index:999; }
11 11
.logo{ display:block; width:80px; height:50px; background:url(../images/logo2.png) no-repeat; margin-left:80px; margin-top:5px; float:left;}
12 12
.searchblock{ width:280px; height:35px; position:absolute; left:50%; top:50%; margin-left:-132px; margin-top:-17.5px; display:none;}
13 13
.search-txt{ width:220px; height:35px; background:#fff; border:none;-moz-border-radius:10px 0 0 10px;-webkit-border-radius:10px 0 0 10px; border-radius:10px 0 0 10px; behavior:url(../js/ie-css3.htc); float:left;font:14px/35px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; padding-left:10px; color:#a3a3a3;}

+ 10 - 10
src/main/webapp/css/index.css

@ -273,16 +273,16 @@ label.edu-radio{ float:none;font:16px/26px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei
273 273

274 274
/*合作历史及评价*/
275 275
.evaluate{ overflow:hidden; border-bottom:1px dashed #d6d6d6; padding:10px 0;}
276
.lefteva{ float:left; max-height:200px; width:20%; max-width:200px; text-align:center; margin-top:10px;}
277
.evaimg{ display:block; width:60px; height:60px; overflow:hidden; border:1px solid #999; border-radius:50%; margin:auto;}
278
.righteva{ padding:0 10px; float:right; width:80%;}
279
.evasort{ /*font:16px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";*/}
280
.evasort li{ text-overflow:ellipsis; overflow:hidden; white-space:nowrap;}
281
.evastarbox{ overflow:hidden;}
282
.evastar{ display:block; width:24px; height:24px; cursor:pointer; float:left; background:url(../images/evastar.png) 0 -22px no-repeat;}
283
.evabrief{ display:block; max-height:80px; overflow:hidden; text-overflow:ellipsis; }
284
.morebtn{ text-align:right; overflow:hidden;}
285
.morelink{ color:#333;font:14px/60px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; float:right; margin-right:20px;}
276
.evaluate .lefteva{ float:left; max-height:200px; width:20%; max-width:200px; text-align:center; margin-top:10px;}
277
.evaluate .evaimg{ display:block; width:60px; height:60px; overflow:hidden; border:1px solid #999; border-radius:50%; margin:auto;}
278
.evaluate .righteva{ padding:0 10px; float:right; width:80%;}
279
.evaluate .evasort{ /*font:16px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";*/}
280
.evaluate .evasort li{ text-overflow:ellipsis; overflow:hidden; white-space:nowrap;}
281
.evaluate .evastarbox{ overflow:hidden;}
282
.evaluate .evastar{ display:block; width:24px; height:24px; cursor:pointer; float:left; background:url(../images/evastar.png) 0 -22px no-repeat;}
283
.evaluate .evabrief{ display:block; max-height:80px; overflow:hidden; text-overflow:ellipsis; }
284
.evaluate .morebtn{ text-align:right; overflow:hidden;}
285
.evaluate .morelink{ color:#333;font:14px/60px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; float:right; margin-right:20px;}
286 286

287 287
/*个人修改页面科研资源*/
288 288
.enterwork{ color:#333;position:absolute; bottom:10px; left:110px;}

+ 96 - 0
src/main/webapp/css/popup.css

@ -0,0 +1,96 @@
1
@charset "utf-8";
2
/* CSS Document */
3
.frmtype{ width:100%; border-radius:5px; border:1px #dadada solid; padding:0 10px; min-height:30px;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";}
4
.frmtype:focus{ border:1px solid #ff8500;}
5
.frmbtn{ width:100px; margin:10px; background:#ff8400; color:#fff; border:none; }
6
.frmrbtn{ background:none; color:#303030; border:none; }
7
.updownbtn{text-decoration:underline; color:#333;}
8

9
.blackcover{ width:100%; height:100%;overflow-x: hidden;overflow-y: auto; position:fixed; background:rgba(0,0,0,.6); z-index:1000; }
10
.resoufrm p{ font-size:14px;}
11
/*弹窗资源信息、申请信息*/
12
.resouinfo{position:absolute;background:#fff;border-radius:10px;padding:20px;z-index:1001; }
13

14
.resoutit{padding: 0 20px;font: 16px/40px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #606060; border-bottom:1px solid #ff8400; position:relative; font-weight:bold;}
15
.resoutit .stateinfor{ position:absolute; bottom: -46px;right: -20px;background: #ff8400; color: #fff; padding: 0 40px;border-radius: 10px 0 0 10px;z-index: 2; cursor:pointer;}
16
.resoutit .showinfor{ position:absolute; left:60px; top:2px; font-size:13px; font-weight:normal;}
17
.resouinfotype{ font-weight:normal; text-align:right;}
18
.resouinforcon{ padding:0 10px; width:100%; position:relative; max-width:540px;}
19

20
.resoubox{ padding:20px; }
21
.resoubox table{width:620px;}
22
.resoutab{ min-width:400px;}
23
.resoutab tr td{ min-width:260px; padding:4px; }
24
.requiredcon{ color:red; position:absolute;font-size:16px; top:0; right:0;}
25

26
.resouimg{width:100%; border:1px solid #d6d6d6; height:240px; position:relative; overflow:hidden;  }
27
.resouup{width: 100%;height:100%;position: absolute; top:0;background-color: rgba(0,0,0,0.4);font: 14px/240px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #fff; text-align:center;}
28
#resouup{ width: 100%;height:100%;box-shadow: none;opacity:0; position: absolute;left:0;top:0px;cursor: pointer;}
29
/*资源图片上传*/
30
.resouimgshow{ display:none; width:100%; height:100%;}
31
.wrap{ height:200px;position:relative; }
32
.jy-up-ch{ position: relative; left:20px; bottom:0; width: 200px;}
33
.jy-up-ch .bch{ display: block; position: absolute; background-repeat: no-repeat; background-image: url(../images/bch.jpg); }
34
.jy-up-ch .bch1{ width: 15px; height: 20px; background-position: 0 0; left: 0; top: 10px; }
35
.jy-up-ch .bch2{ width: 39px; height: 24px; background-position: -15px 0px; left: 50%; margin-left: -39px; top: 7px; }
36
.jy-up-ch .bch3{ width: 37px; height: 24px; background-position: -54px 0px; left: 50%; top: 7px; }
37
.jy-up-ch .bch4{ width: 15px; height: 20px; background-position: -91px 0px; right: 0; top: 10px; }
38
.jy-up-ch .bch1:hover{ background-position: 0 -27px; }
39
.jy-up-ch .bch2:hover{ background-position: -15px -24px;}
40
.jy-up-ch .bch3:hover{ background-position: -54px -24px;}
41
.jy-up-ch .bch4:hover{ background-position: -91px -27px;}
42
.jc-demo-box{position: relative; background-color: #f8f8f8; width: 100%; height: 100%; overflow: hidden; }
43
.jcrop_w{ overflow: hidden; }
44
.jcrop_w img{ position: absolute; }
45

46
/*合作项目及评价*/
47
.teamworkbox{ margin-top:20px;}
48
.teamworktit{padding: 0 10px;font: 16px/40px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #606060; border-bottom:1px solid #ff8400;}
49
.teamwork{ overflow:hidden; padding:10px 0; border-bottom:1px dashed #d6d6d6; margin-top:10px;}
50
.teamwork .lefteva{ float:left; max-height:200px; width:20%; max-width:200px; text-align:center; margin-top:10px;}
51
.teamwork .lefteva .evaimg{ display:block; width:50px; height:50px; overflow:hidden; border:1px solid #d6d6d6; border-radius:50%; margin:auto;}
52
.teamwork .righteva{padding:0 10px; float:left; margin-left:20px; font-size:14px; width:78%; max-width:458px;}
53
.teamwork .righteva  .teamname{ position:relative;}
54
.teamwork .righteva .teamname .teamtime{ position:absolute; right:0;}
55
.teamwork .righteva .evastarbox{ overflow:hidden;}
56
.teamwork .righteva .evastar{ display:block; width:24px; height:24px; cursor:pointer; float:left; background:url(../images/evastar.png) 0 -22px no-repeat;}
57
.teamwork .righteva .evabrief{ display:block; margin-top:10px; max-height:80px; overflow:hidden; }
58

59
.workclose{ position:absolute; top:16px; right:0px; background:#aaa; color:#fff;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; padding-left:10px; display:block; width:46px; border-radius:10px 0px 0px 10px; height:30px; cursor:pointer; z-index:999;}
60

61
.resoutab .workmsgbox td{padding:0; margin:0;}
62
.workmsg{ clear:both;font:14px/26px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; color:red; padding-left:20px; background:url(../images/info_warn.png) 0 center no-repeat; }
63

64
/*//资源申请*/
65
.resouapply{position:absolute; background:#fff;border-radius:10px;padding:20px;z-index:1002; display:none;}
66

67

68
/*评价*/
69
.commentinfo{position:absolute;background:#fff;border-radius:10px;padding:20px;z-index:1001; }
70
.commentinfo .wordlimit{ font-size:12px; color:#999; text-align:right;}
71
.commentbox{ padding:20px; }
72
.commentbox table{width:600px;}
73
.commentcon tr td{ width:90%;max-width:400px; padding:4px 0;}
74
.commentcon tr th{ width:10%;}
75
.noconmment{ line-height:120px;}
76

77
.evastarbox2{ overflow:hidden;}
78
.evastar2{ display:block; width:24px; height:24px; cursor:pointer; float:left; background:url(../images/evastar.png) 0 -22px no-repeat;}
79

80
/*留言*/
81
.guestbookinfo{position:absolute;background:#fff;border-radius:10px;padding:20px;z-index:1001; }
82
.guestbookinfo .wordlimit{ font-size:12px; color:#999;}
83
.guestbookcon{padding:20px; width:560px;}
84
.guestcon{ border-top:1px #d6d6d6 solid;  padding:20px 0;}
85
.guestconitem{ padding:10px 0; overflow:hidden; margin-bottom:10px;border-bottom:1px dashed #d6d6d6;}
86
.guestconitem:nth-child(odd){ background:#f8f8f8;}
87
.guestcon .lefteva{ float:left; max-height:200px; width:20%; max-width:200px; text-align:center; margin-top:10px;}
88
.guestcon .lefteva .evaimg{ display:block; width:80px; height:80px; overflow:hidden; border:1px solid #d6d6d6; border-radius:50%; margin:auto;}
89
.guestcon .righteva{padding:0 10px; float:left; margin-left:20px; font-size:14px;  width:79%; max-width:400px;}
90
.guestcon .righteva .guestname{ position:relative;}
91
.guestcon .righteva .guestname .guesttime{ position:absolute; right:0;}
92
.guestcon .righteva .evabrief{ display:block; margin-top:10px; max-height:80px; overflow:hidden; }
93

94

95

96


+ 3 - 33
src/main/webapp/css/workspace.css

@ -1,14 +1,12 @@
1 1
@charset "utf-8";
2 2
/* CSS Document */
3
.con-center{ width:1200px;position:relative; margin:auto; overflow:hidden;padding:20px 10px; margin-top:60px;}
4
.frmtype{ width:100%; border-radius:5px; border:1px #dadada solid; padding:0 10px; min-height:30px;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; background:none;}
3
.con-center{ width:1170px;position:relative; margin:auto; overflow:hidden;padding:20px 10px; margin-top:60px;}
4
.frmtype{ width:100%; border-radius:5px; border:1px #dadada solid; padding:0 10px; min-height:30px;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";}
5 5
.frmtype:focus{ border:1px solid #ff8500;}
6 6
.frmbtn{ width:100px; margin:10px; background:#ff8400; color:#fff; border:none; }
7 7
.frmrbtn{ background:none; color:#303030; border:none; }
8 8
.updownbtn{text-decoration:underline; color:#333;}
9 9

10
.blackcover{ width:100%; height:100%; position:fixed; background:rgba(0,0,0,.6); z-index:1000;}
11

12 10
/*左侧菜单*/
13 11
.workmenu{ float:left; width:12%; height:300px; background: #fafafa;border-radius: 6px;overflow: hidden;}
14 12
.workmenutit{height: 60px;padding: 0 20px;font: 16px/60px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; border-bottom:1px #ff8400 solid;cursor:pointer;}
@ -50,20 +48,7 @@
50 48
.worktab .workitem:nth-child(odd){background:#fff;}
51 49
.workitemsrc{ cursor:pointer; color:#702C40;}
52 50
.operatebtn{ display:block; cursor:pointer;}
53
/*弹窗资源信息、申请信息*/
54
.resouinfo{position:fixed;top:50%;left:50%; margin-top:-320px; margin-left:-250px; background:#fff;border-radius:10px;padding:20px;z-index:1001;}
55
.resouapply{position:fixed;top:50%;left:50%; margin-top:-320px; margin-left:-250px; background:#fff;border-radius:10px;padding:20px;z-index:1002; }
56
.resoutit{padding: 0 20px;font: 16px/40px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #606060; border-bottom:1px solid #ff8400;}
57
.resoutab{ margin:20px; min-width:500px;}
58
.resoutab tr td{ min-width:200px; max-width:500px; padding:4px; }
59
.resouinfotype{ font-weight:normal; text-align:right;}
60
.resouimg{width:200px; height:200px; position:relative; overflow:hidden;  }
61
.resouup{display: block;width: 100%;height: 50px;position: absolute;/*bottom: -50px;*/background-color: rgba(0,0,0,0.4);font: 14px/44px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #fff; text-align:center;}
62
#resouup{ width: 100%;height:50px;box-shadow: none;opacity:0; position: absolute;left:0;top:0px;cursor: pointer;}
63
.workclose{ position:absolute; top:16px; right:0px; background:#ff8400; color:#fff;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; padding-left:8px; display:block; width:46px; border-radius:10px 0px 0px 10px; height:30px; cursor:pointer; z-index:999;}
64

65
.resoutab .workmsgbox td{padding:0; margin:0;}
66
.workmsg{ clear:both;font:14px/26px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; color:red; padding-left:20px; background:url(../images/info_warn.png) 0 center no-repeat; }
51

67 52

68 53
/*////////////我的工作台/////////////////*/
69 54
.workblock{ padding:10px; overflow:hidden;  background:#fff; margin:10px 0; margin-bottom:20px;}
@ -145,21 +130,6 @@
145 130
.workobjcon .newobjects{ border:2px dashed #e5e5e5; line-height:80px; background:none;}
146 131
.workobjcon .newobjects .newobjecticon{ line-height:100px; font-size:40px;}
147 132

148
/*资源图片上传*/
149
/*.wrap{ height:200px;}
150
.jy-up-ch{ position: relative; width: 200px;}
151
.jy-up-ch .bch{ display: block; position: absolute; background-repeat: no-repeat; background-image: url(../images/bch.jpg); }
152
.jy-up-ch .bch1{ width: 15px; height: 20px; background-position: 0 0; left: 0; top: 10px; }
153
.jy-up-ch .bch2{ width: 39px; height: 24px; background-position: -15px 0px; left: 50%; margin-left: -39px; top: 7px; }
154
.jy-up-ch .bch3{ width: 37px; height: 24px; background-position: -54px 0px; left: 50%; top: 7px; }
155
.jy-up-ch .bch4{ width: 15px; height: 20px; background-position: -91px 0px; right: 0; top: 10px; }
156
.jy-up-ch .bch1:hover{ background-position: 0 -27px; }
157
.jy-up-ch .bch2:hover{ background-position: -15px -24px;}
158
.jy-up-ch .bch3:hover{ background-position: -54px -24px;}
159
.jy-up-ch .bch4:hover{ background-position: -91px -27px;}
160
.jc-demo-box{position: relative; background-color: #f8f8f8; width: 100%; height: 100%; overflow: hidden; }
161
.jcrop_w{ overflow: hidden; }
162
.jcrop_w img{ position: absolute; }*/
163 133

164 134

165 135


二進制
src/main/webapp/images/default-resource.jpg


+ 240 - 58
src/main/webapp/js/popup.js

@ -1,77 +1,155 @@
1 1
// JavaScript Document
2

3 2
// 资源信息
4 3
function ResourceInfo() {
5 4
		var PopHtml="";
6
		var CoverHtml="";
7
		CoverHtml += '<div class="blackcover"></div>';
5

6
		PopHtml += '<div class="blackcover">';
8 7
		PopHtml += '<div class="resouinfo"><form class="resoufrm">';
9
		PopHtml += '<div class="resoutit">资源信息</div>';
8
		PopHtml += '<div class="resoutit">资源信息<div class="stateinfor">申请</div></div>';
9
		PopHtml += '<div class="resoubox">';
10
		//资源信息
10 11
		PopHtml += '<table class="resoutab"><tr>';
11 12
		PopHtml += '<th class="resouinfotype" scope="row">资源名称</th>';
12
		PopHtml += '<td><input type="text" class="frmtype"id="resourceName" ></td>';
13
		
14
//		PopHtml += '<td rowspan="9">';
15
//		PopHtml += '<div class="resouimg" >';
16
//		PopHtml += '<span class="resouup"><input type="file" id="resouup">上传资源图片</span>';
17
//		PopHtml += '<div class="wrap" id="jcropdiv"><div class="jc-demo-box" data="0">';//选择图片尺寸
18
//		PopHtml += '<div id="target" class="jcrop_w" ><img src="" width="100%" height="100%" id="resouimg" /></div></div>';
19
//		PopHtml += '<div class="jy-up-ch">';//放大缩小旋转操作图片
20
//		PopHtml += '<a id="idLeft" href="" class="bch bch1"></a>';
21
//		PopHtml += '<a id="idSmall" href="" class="bch bch2"></a>';
22
//		PopHtml += '<a id="idBig" href="" class="bch bch3"></a>';
23
//		PopHtml += '<a id="idRight" href="" class="bch bch4"></a>';
24
//		PopHtml += '</div></div>';
25
//		PopHtml += '<input id="x" type="hidden"/>';
26
//		PopHtml += '<input id="y" type="hidden"/>';
27
//		PopHtml += '<input id="w" type="hidden"/>';
28
//		PopHtml += '<input id="h" type="hidden"/>';
29
//		PopHtml += '</div></td></tr>';
30
		PopHtml += '<td rowspan="9"><div class="resouimg" ><img src="" width="100%" height="100%"><span class="resouup"><input type="file" id="resouup" >上传资源图片</span></div></td>';
31
		PopHtml += '</tr>';
32
		
33
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg1"></div></td></tr>';
34
		PopHtml += '<tr><th class="resouinfotype"  scope="row">资源发布者</th><td><input type="text" class="frmtype" id="professor" >  </td></tr>';
35
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg2"></div></td></tr>';
36
		PopHtml += '<tr><th class="resouinfotype"  scope="row">可提供服务</th><td><input type="text" class="frmtype" id="supportedServices"></td></tr>';
37
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg3"></div></td></tr>';
38
		PopHtml += '<tr><th class="resouinfotype"  scope="row">学术领域</th><td><input type="text" class="frmtype" id="subject"></td></tr>';
39
		PopHtml += '<tr><th class="resouinfotype"  scope="row">应用行业</th><td><input type="text" class="frmtype" id="industry"></td></tr>'; 
40
		PopHtml += '<tr><th class="resouinfotype"  scope="row">期望付款方式</th><td><input type="text" class="frmtype" placeholder="例:一次性付款" id="hopePayMethod"></td></tr>';
41
		PopHtml += '<tr><th class="resouinfotype"  scope="row">详细描述</th><td colspan="2" ><textarea class="frmtype" id="descp"></textarea></td></tr>';
42
		PopHtml += '<tr><th class="resouinfotype" scope="row">合作备注</th><td colspan="2"><textarea class="frmtype" id="cooperationNotes"></textarea></td></tr>';
43
		PopHtml += '<tr><td colspan="3"><div class="addrebtn" style="text-align:center;"><input type="button" value="保存" class="frmtype frmbtn" id="inputb"><input type="button" value="删除资源" class="frmtype frmbtn frmrbtn" id="deletedResource"></div></td></tr>';
44
		PopHtml += '</table></form> <span class="workclose">关闭</span></div>';
45
		
46
		//必须先将_html添加到body,再设置Css样式
47
		$("body").before(CoverHtml);
48
        $("body").append(PopHtml);
49
		
13
		PopHtml += '<td><div class="resouinforcon"><input type="text" class="frmtype" id="resourceName" ><span class="requiredcon">*</span></div></td>';
14
		/////////////资源图片上传////////////////////
15
		//资源图片上传btn
16
		PopHtml += '<td rowspan="8">';
17
		PopHtml += '<div class="resouinforcon">';
18
		PopHtml += '<div class="resouimg" >';
19
		PopHtml += '<span class="resouup"><input type="file" id="resouup" >上传资源图片</span>';
20
		PopHtml += '<div class="resouimgshow">';
21
		PopHtml += '<div class="wrap" id="jcropdiv">';
22
		PopHtml += '<div class="jc-demo-box" data="0"><div id="target" class="jcrop_w" ><img src="" id="resouImage" /></div></div>';
23
		PopHtml += '<div class="jy-up-ch">';
24
        //图像操作                                                        
25
		PopHtml += '<a id="idLeft" href="" class="bch bch1"></a>';
26
        PopHtml += '<a id="idSmall" href="" class="bch bch2"></a>';
27
        PopHtml += ' <a id="idBig" href="" class="bch bch3"></a>';
28
        PopHtml += '<a id="idRight" href="" class="bch bch4"></a>';
29
        PopHtml += '</div></div>';
30
 		PopHtml += '<input id="x" type="hidden"/><input id="y" type="hidden"/><input id="w" type="hidden"/><input id="h" type="hidden"/>';
31
		PopHtml += '</div></div></div></td></tr>';
32
		/////////////资源图片上传 结束////////////////////
33

34
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="resouinforcon"><div class="workmsg workmsg1"></div></div></td></tr>  ';
35
		PopHtml += '<tr><th class="resouinfotype"  scope="row">资源发布者</th><td><div class="resouinforcon" id="professor" >张三</div></td></tr>';
36
		PopHtml += '<tr><th class="resouinfotype"  scope="row">可提供服务</th><td><div class="resouinforcon"><input type="text" class="frmtype"  id="supportedServices"><span class="requiredcon">*</span></div></td></tr>';
37
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="resouinforcon"><div class="workmsg workmsg3"></div></div></td></tr>  ';
38
		PopHtml += '<tr><th class="resouinfotype"  scope="row">学术领域</th><td><div class="resouinforcon"><input type="text" class="frmtype" id="subject"></div></td></tr>';
39
		PopHtml += '<tr><th class="resouinfotype"  scope="row">应用行业</th><td><div class="resouinforcon"><input type="text" class="frmtype" id="industry"></div></td></tr>'; 
40
		PopHtml += '<tr><th class="resouinfotype"  scope="row">期望付款方式</th><td><div class="resouinforcon"><input type="text" class="frmtype" placeholder="例:一次性付款"  id="hopePayMethod"></div></td></tr>';
41
		PopHtml += '<tr><th class="resouinfotype"  scope="row">详细描述</th><td colspan="2" ><div class="resouinforcon"><textarea class="frmtype" id="descp"></textarea></div></td></tr>';
42
		PopHtml += '<tr><th class="resouinfotype" scope="row">合作备注</th><td colspan="2"><div class="resouinforcon"><textarea class="frmtype" id="cooperationNotes"></textarea></div></td></tr>';
43
		PopHtml +='</table>';
44
		//按钮盒子
45
		PopHtml +='<table class="btntab"><tr><td>';
46
		PopHtml += '<div class="addrebtn" style="text-align:center;"><input type="button" value="保存" class="frmtype frmbtn" id="inputb"><input type="button" value="删除资源" class="frmtype frmbtn frmrbtn" id="deletedResource"></div>';
47
		PopHtml += '</td></tr></table>';
48
		//合作历史及评价
49
		PopHtml += '<table class="teamworkbox">';
50
		PopHtml += '<tr><td><div class="teamworktit">合作历史及评价</div></td></tr>';
51
		PopHtml += '<tr><td><div class="teamwork">';
52
		PopHtml += '<div class="lefteva"><a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a><p>专家姓名</p><p>职称,职位</p><p>XXX学校,XXX机222222222222222构</p></div>';
53
		PopHtml += '<div class="righteva">';
54
        PopHtml += '<ul class="evasort"><li class="teamname"><span>XXXXXX资源的合作</span><span class="teamtime">2016-09-06</span></li></ul>';
55
        PopHtml += '<div class="evastarbox"><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span></div>';
56
        PopHtml += '<p class="evabrief">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo co Proin gravida dolor sit amet lacus accumsan etiverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et  </p>';
57
        PopHtml += '</div></div>';
58
		PopHtml += '</td></tr></table>';
59
		PopHtml += '</div></form>';
60
		//关闭按钮
61
		PopHtml += '<span class="workclose">关闭</span>';
62
		PopHtml += '</div></div>';
63

64
		//必须先将html添加到body,再设置Css样式
65
        $("body").before(PopHtml);
66
		$("body").css("overflow-y","hidden");
50 67
      //上传资源图像的hover
51
        $(".resouimg").hover(function(){
52
        	$(".resouup").animate({
53
        		"bottom": "0px"
54
        	});
55
        }, function() {
56
        	$(".resouup").animate({
57
        		"bottom": "-50px"
58
        	});
59
        })
60
		
61
		var _widht = document.documentElement.clientWidth;  //屏幕宽
62
		var _height = document.documentElement.clientHeight; //屏幕高
68
        // $(".resouimg").hover(function(){
69
        // 	$(".resouup").animate({
70
        // 		"bottom": "0px"
71
        // 	});
72
        // }, function() {
73
        // 	$(".resouup").animate({
74
        // 		"bottom": "-50px"
75
        // 	});
76
        // })		
77
		//var _widht = document.documentElement.clientWidth;  //屏幕宽
78
		//var _height = document.documentElement.clientHeight; //屏幕
79
        var _widht = $(".blackcover").width();
80
        var _height = $(".blackcover").height();
63 81
		var boxWidth = $(".resouinfo").width();
64 82
		var boxHeight = $(".resouinfo").height();
83
		
84
//		console.log(document.documentElement.clientWidth);
85
//		console.log(document.documentElement.clientHeight);
86
//		console.log(_widht);
87
//		console.log(_height);
65 88
		//让提示框居中
66
		$(".resouinfo").css({ top: '(_height - boxHeight)/2 + "px"', left: '(_widht - boxWidth) / 2 + "px"' });
89
		$(".resouinfo").css({ top: (_height - boxHeight)/2 + "px", left: (_widht - boxWidth) / 2 + "px" });
67 90

68 91

69 92
		//关闭按钮
70 93
		$(".workclose").click(function(){
71 94
			$(".blackcover").remove();
72
			$(".resouinfo").remove();
73 95
			
74
		})
96
		});
97
		
98
		
99
	   //资源图像上传
100
		$(function (){
101
			var id = $.cookie('');
102
			var cacheImageKey=null;
103
			if(id){
104
				$("#resouImage").attr("src","/images/resource/"+id+".jpg");
105

106
				$('#resouup').live('change',function(){ 
107
					$(".resouimgshow").show();
108
					$(".resouup").hide();
109
					$.ajaxFileUpload({
110
						url:"../ajax/cachedFileUpload",
111
						secureuri:false,
112
						fileElementId:"resouup",
113
						dataType:"json",
114
						success:function($data){
115
							if($data.success){
116
								cacheImageKey =$data.data[0].cacheKey
117
								$("#resouImage").attr("src","/images/tmp/"+cacheImageKey);
118
							}else{
119
								alert($data.msg);
120
							}
121
						},
122
						error:function(){
123
							$.MsgBox.Alert("message","upload error");
124
						}    					
125
					});
126
				});
127
				
128
			}
129
			$("#inputb").on("click",function(){
130
				var x = parseInt($("#x").val()/395*100);
131
				var y = parseInt($("#y").val()/340*100);
132
				var w = parseInt($("#w").val()/395*100);
133
				var h = parseInt($("#h").val()/340*100);
134
				if(cacheImageKey){
135
					$.ajax({
136
						url:"../ajax/image/resource",
137
						type:"POST",
138
						data:{"id":id,"fn":cacheImageKey,"x":x,"y":y,"w":w,"h":h},
139
						dataType:"json",
140
						success:function($data){
141
							if($data.success){
142
								alert("上传成功");
143
								location.reload(true);
144
							}else{
145
								alert($data.msg);
146
							}
147
						}
148
					});
149
				}
150
			});
151

152
		})	
75 153
}
76 154
//资源信息 //
77 155

@ -128,4 +206,108 @@ function ResourceApply(){
128 206
		})
129 207
                 	  
130 208
}
131
//资源申请确认 //
209
//资源申请确认 //
210

211
//评价 //
212
function CommentInfo() {
213
		var PopHtml="";
214

215
		PopHtml += '<div class="blackcover">';
216
		PopHtml += '<div class="commentinfo"><form class="resoufrm">';
217

218
		/*输入评价tab*/
219
		PopHtml += '<div class="addcomment">';
220
		PopHtml += '<div class="resoutit">评价<div class="showinfor">评价后可看到对方对您的评价</div></div>';
221
		PopHtml += '<div class="commentbox"><table class="commentcon">';
222
		//星级评价
223
		PopHtml += '<tr><th class="resouinfotype" scope="row">总体评价</th><td><div class="resouinforcon"><div class="evastarbox2"><span class="evastar2"></span><span class="evastar2"></span><span class="evastar2"></span><span class="evastar2"></span><span class="evastar2"></span></div></div></td></tr>';
224
		//评价内容
225
		PopHtml += '<tr> <th class="resouinfotype" scope="row">评价内容</th> <td><div class="resouinforcon"><textarea class="frmtype"></textarea></div></td></tr>';
226
		PopHtml += '<tr> <th class="resouinfotype" scope="row"></th><td><div class="resouinforcon"><div class="wordlimit">字数限制为5~200个</div></div></td> </tr>';
227
		PopHtml += '</table>';
228
		//按钮
229
		PopHtml += '<table class="btntab"><tr><td><div class="addrebtn" style="text-align:center;"><input type="button" value="发表评论" class="frmtype frmbtn"></div> </td> </tr></table>';
230
		PopHtml += ' </div> </div>';
231
		/*查看评价信息*/
232
		PopHtml += '<div class="sqlcomment">';
233
		PopHtml += '<div class="resoutit">评价信息</div>';
234
		PopHtml += '<div class="commentbox"><table class="commentcon">';
235
		//双方都评价
236
		PopHtml += '<tr><td> <div class="teamwork">';
237
		PopHtml += '<div class="lefteva"> <a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a><p>专家姓名</p><p>职称,职位</p><p>XXX学校,XXX机222222222222222构</p></div>';
238
		PopHtml += '<div class="righteva">';
239
        PopHtml += '<ul class="evasort"><li class="teamname"><span>XXXXXX资源的合作</span><span class="teamtime">2016-09-06</span></li></ul>';
240
        PopHtml += '<div class="evastarbox"><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span><span class="evastar"></span></div>';
241
        PopHtml += '<p class="evabrief">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo co Proin gravida dolor sit amet lacus accumsan etiverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et  </p>';
242
        PopHtml += '</div></div>';
243
        //对方未评价
244
        PopHtml += '<tr><td> <div class="teamwork">';
245
		PopHtml += '<div class="lefteva"> <a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a><p>专家姓名</p><p>职称,职位</p><p>XXX学校,XXX机222222222222222构</p></div>';
246
		PopHtml += '<div class="righteva"><div class="noconmment">对方还未评价</div></div>';
247
		PopHtml += '</td></tr> </table></div> </div> ';
248
		PopHtml += '</form>';
249
		PopHtml += '<span class="workclose">关闭</span>';
250
		PopHtml += '</div></div>';
251

252
	//必须先将html添加到body,再设置Css样式
253
        $("body").before(PopHtml);
254
		$("body").css("overflow-y","hidden");
255
      
256
        var _widht = $(".blackcover").width();
257
        var _height = $(".blackcover").height();
258
		var boxWidth = $(".commentinfo").width();
259
		var boxHeight = $(".commentinfo").height();
260
		
261
		//让提示框居中
262
		$(".commentinfo").css({ top: (_height - boxHeight)/2 + "px", left: (_widht - boxWidth) / 2 + "px" });
263

264

265
		//关闭按钮
266
		$(".workclose").click(function(){
267
			$(".blackcover").remove();
268
			
269
		});
270
}		
271

272
//  评价//	
273

274
//留言 //
275
function GuestbookInfo() {
276
		var PopHtml="";
277

278
		PopHtml += '<div class="blackcover">';
279
		PopHtml += '<div class="guestbookinfo"><form class="resoufrm"><div class="guestbook">';
280
		PopHtml += '<div class="resoutit">留言板</div>';
281
		PopHtml += '<div class="guestbookcon"><div class="resouinforcon"><textarea class="frmtype"></textarea></div>';
282
		PopHtml += '<div class="resouinforcon"><div class="wordlimit">字数限制为5~200个</div></div>';
283
		PopHtml += '<div class="addrebtn" style="text-align:right;"> <input type="button" value="留言" class="frmtype frmbtn"></div></div>';
284
		PopHtml += '<div class="guestcon"><div class="guestconitem">';
285
		PopHtml += '<div class="lefteva"> <a href="" class="evaimg"><img src="images/default-photo.jpg" width="100%" height="100%"></a> </div>';
286
		PopHtml += ' <div class="righteva">';
287
		PopHtml += '<ul class="evasort"> <li class="guestname"><span>李四</span><span class="guesttime">2016-09-06 08:00</span></li></ul>';
288
		PopHtml += '<p class="evabrief">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo co Proin gravida dolor sit amet lacus accumsan etiverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et iverra justo co Proin gravida dolor sit amet lacus accumsan et  </p>';
289
		PopHtml += '</div></div> </div></div></form>';
290
		PopHtml += '<span class="workclose">关闭</span>';
291
		PopHtml += '</div></div>';
292

293
		//必须先将html添加到body,再设置Css样式
294
        $("body").before(PopHtml);
295
		$("body").css("overflow-y","hidden");
296
      
297
        var _widht = $(".blackcover").width();
298
        var _height = $(".blackcover").height();
299
		var boxWidth = $(".guestbookinfo").width();
300
		var boxHeight = $(".guestbookinfo").height();
301
		
302
		//让提示框居中
303
		$(".guestbookinfo").css({ top: (_height - boxHeight)/2 + "px", left: (_widht - boxWidth) / 2 + "px" });
304

305

306
		//关闭按钮
307
		$(".workclose").click(function(){
308
			$(".blackcover").remove();
309
			
310
		});
311
}	
312

313
//  留言//	

+ 236 - 2
src/main/webapp/js/register.js

@ -33,7 +33,241 @@ $(".mail").click(function(){
33 33
  $("#phone_form").hide();
34 34
  $("#mail_form").show();
35 35
});
36
//手机注册模块
37
//验证手机号
38
var phonePass = false;
39
function phoneVal(){
40
	var phone= $("#lp_phone").val();
41
	if(phone.length==0){
42
        $(".msgphone1").text("请输入您的手机号码");
43
    }else{
44
    	var hunPhone=/^1[3|4|5|7|8]\d{9}$/; 
45
		if(hunPhone.test(phone.trim())){
46
			$(".msgphone1").text("");
47
			phonePass = true;
48
		}else{
49
			phonePass = false;
50
			$(".msgphone1").text("手机格式正确,请输入正确的手机号码");
51
		}
52
    }    
53
}
54
$("#lp_phone").blur(function(){
55
	phoneVal();
56
});
57
//验证随机验证码
58
//var phoneCode=false;
59
//$("#lp_yzm").blur(function(){
60
//	var authCode=$("#lp_yzm").val();
61
//	if(authCode.length==0){
62
//		$(".msgphone2").text("请输入您的验证码");
63
//		phoneCode=false;
64
//	}else{
65
//		var d=/^[0-9a-zA-Z]{4}$/;
66
//		if(d.test(authCode.trim())){
67
//			$(".msgphone2").text("");
68
//			phoneCode=true;
69
//		}
70
//		else{
71
//			$(".msgphone2").text("请输入您的验证码不正确");
72
//			phoneCode=false;
73
//		}
74
//	}
75
//});
76
//获取手机验证码
77
var setTime;
78
$(".getcode1").click(function(){
79
	$(".coderli span").removeClass("getcode1").addClass("getcode2");;	
80
	setTime=setInterval(Countdown,1000);
81
	phoneVerificationCode();
82
})
83
var j=60;
84
function  Countdown(){
85
	j--;
86
	$(".getcode2").text(j);
87
	if(j==0){
88
		$(".coderli span").removeClass("getcode2").addClass("getcode1").text("请重新获取验证码");
89
		clearInterval(setTime);
90
		j=60;
91
	}
92
}
93
var state;
94
function  phoneVerificationCode(){
95
	if(phonePass){
96
	$.ajax("/ajax/regmobilephone", 
97
			{
98
				type: "get",
99
				async: true,
100
				success: function(data) {
101
					if(data.success) {
102
						state=data.data;
103
					}
104
				},
105
				error: function() {
106
					$.MsgBox.Alert('message', 'fail')
107
				},
108
				data: {
109
					"mobilePhone": $("#lp_phone").val()
110
				},
111
				dataType: 'json'
112
			});
113
	}
114
};
115
//验证手机验证码
116
var setpass1= false;
117
function setPhoneCode(){
118
	var pass= $("#lp_coder").val();
119
	if(pass.length==0){
120
        $(".msgphone3").text("请输入您的验证码");
121
    }else{
122
    	var hunPhone=/^[0-9]{4}$/; 
123
		if(hunPhone.test(pass.trim())){
124
			$(".msgphone3").text("");
125
			setpass1 = true;
126
		}else{
127
			$(".msgphone3").text("验证码4位");
128
		}
129
    }  
130
}
131
$("#lp_coder").blur(function(){
132
	setPhoneCode();
133
});
134
//设置密码
135
var password;
136
var setpass = false;
137
function setPassword(){
138
	password= $("#phone_password").val();
139
	if(password.length==0){
140
        $(".msgphone4").text("请输入您的密码");
141
    }else{
142
    	var hunPhone=/^[0-9a-zA-Z]{6,}$/; 
143
		if(hunPhone.test(password.trim())){
144
			$(".msgphone4").text("");
145
			setpass = true;
146
		}else{
147
			$(".msgphone4").text("密码6到16位");
148
		}
149
    }  
150
}
151
$("#phone_password").blur(function(){
152
	setPassword();
153
});
154
//再次确定密码
155
var setpassagain = false;
156
function setPasswordAgain(){
157
	var passwordAgain= $("#phone_password2").val();
158
	if(passwordAgain.length==0){
159
        $(".msgphone5").text("请再次输入您的密码");
160
    }else{
161
    	var hunPhone=/^[0-9a-zA-Z]{6,}$/; 
162
		if(hunPhone.test(password.trim())&&passwordAgain==password){
163
			$(".msgphone5").text("");
164
			setpassagain= true;
165
		}else{			
166
			$(".msgphone5").text("密码错误");
167
		}
168
    }
169
    
170
}
171
$("#phone_password2").blur(function(){
172
	setPasswordAgain();
173
});
174
//手机注册提交
175
$("#btnn").click(function(){
176
 if(phonePass&&setpass1&&setpassagain)
177
 {
178
		$.ajax("/ajax/reg",{
179
			type:"POST",
180
			 async: false,
181
			success:function(data){  
182
			location.href="professor.html?id="+data.data;
183
			},
184
			error:function(){$.MsgBox.Alert('message','fail')},
185
			data:{"state":state,"mobilePhone":$("#lp_phone").val(),
186
			"validateCode":$("#lp_coder").val(),"password":$("#phone_password").val(),
187
		 	dataType: 'json'}
188
		});
189
 }
190
});
191

192

36 193

37
$(".submitBtn").click(function(){
38
  $(this).parent("form").submit();
194
//邮箱注册模块
195
//邮箱验证
196
var emailPass = false;
197
function valEmail()
198
{
199
	var email = $("#lp_email").val();
200
	var gunf=/^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
201
    if(gunf.test(email.trim())){
202
       $(".msgema1 span").text("");
203
       emailPass = true;
204
    }else{
205
    	/*alert("请输入正确是邮箱地址");*/
206
    	$(".msgema1 span").text("请输入正确是邮箱地址");
207
    	emailPass = false;
208
    }
209
}
210
$("#lp_email").blur(function(){
211
	valEmail();
39 212
});
213
//输入密码及确认密码
214
var oldPass = false;
215
var isPass = false;
216
function valOld()
217
{
218
	var oldPassword = $("#mail_password").val();
219
	if(oldPassword.length==0)
220
	{
221
		$(".msgema2 span").text("请输入密码");
222
		oldPass = false;
223
	}else if(oldPassword.length < 6)
224
	{
225
		$(".msgema2 span").text("密码不少于6位,请输入正确的密码");
226
	}else
227
	{
228
		$(".msgema2 span").text("");
229
		oldPass = true;
230
	}
231
}
232
$("#mail_password").blur(function(){
233
	valOld();
234
})
235
function valNew()
236
{
237
	var newPassword = $("#mail_password").val();
238
	var oldPassword = $("#mail_password1").val();
239
	if(oldPassword.length==0)
240
	{
241
		 $(".msgema3 span").text("密码不能为空");
242
	}
243
	else if(oldPassword.length<6)
244
	{
245
		$(".msgema3 span").text("密码长度过短,至少六位");
246
	}else if(oldPassword != newPassword)
247
	{
248
		$(".msgema3 span").text("两次密码不一致");
249
	} else
250
	{
251
		isPass = true;
252
		$(".msgema3 span").text("");
253
	}
254
}
255
$("#mail_password1").blur(function(){
256
	valNew();
257
})
258
//邮箱注册提交
259
$("#btnn1").click(function(){
260
 if(isPass&& emailPass)
261
 {
262
		$.ajax("/ajax/reg",{
263
			type:"POST",
264
			 async: false,
265
			success:function(data){  
266
				location.href="professor.html?id="+data.data;
267
			},
268
			error:function(){$.MsgBox.Alert('message','fail')},
269
			data:{"email":$("#lp_email").val(),"password":$("#mail_password1").val()},		
270
		 	dataType: 'json'}
271
		);
272
 }
273
});

+ 15 - 15
src/main/webapp/js/workspace.js

@ -167,7 +167,7 @@ $(function(){
167 167
	$("#workmysrc").on("click",".resoumag",function()
168 168
			{
169 169
				var resourceID=$(this).attr("resourceId");
170
				console.log(resourceID);
170
				//console.log(resourceID);
171 171
				if(resourceID){
172 172
					$("#deletedResource").on("click",function(){
173 173
						$.ajax({
@ -189,7 +189,7 @@ $(function(){
189 189
						"success":function(info){
190 190
							if(info.success)
191 191
								{
192
								console.log(info);
192
								//console.log(info);
193 193
								$("#resourceName").val(info.data.resourceName);
194 194
								$("#supportedServices").val(info.data.supportedServices);
195 195
								$("#hopePayMethod").val(info.data.hopePayMethod) ;
@ -240,7 +240,7 @@ $(function(){
240 240
										}
241 241
									},
242 242
									"data" : resourceID ? JSON.stringify($data) : $data,
243
									"beforeSend":function(){console.log(this.data)},
243
									"beforeSend":function(){/*console.log(this.data)*/ },
244 244
									"contentType" : resourceID ? "application/json": "application/x-www-form-urlencoded",
245 245
									dataType : "json"
246 246
								});
@ -286,7 +286,7 @@ $.ajax({
286 286
					}
287 287
					
288 288
					$('.resoumag').eq(i+1).attr("resourceId",data.data[i].resourceId);
289
					console.log($('.resoumag').eq(i+1).attr("resourceId"));
289
					//console.log($('.resoumag').eq(i+1).attr("resourceId"));
290 290
					//资源所对应的记录
291 291
					(function(i){
292 292
						$.ajax({		
@ -297,7 +297,7 @@ $.ajax({
297 297
							"success":function(data){
298 298
								if(data.success)
299 299
									{
300
									console.log(data);
300
									//console.log(data);
301 301
										for(var j=0;j<data.data.length;j++){
302 302
											var addString='<tr class="workitem">'
303 303
							                    addString+='<td>'+data.data[j].deliverTime+'</td>'
@ -361,9 +361,9 @@ $.ajax({
361 361
$("#consd").on("click",".modification",function(){
362 362
	ResourceApply();
363 363
	var operationId=$(this).attr("operationId");
364
	console.log(operationId);
364
	//console.log(operationId);
365 365
	var operationStatus=$(this).attr("operationStatus");
366
	console.log(operationStatus);
366
	//console.log(operationStatus);
367 367
	flag=0;
368 368
	ajaxGet(operationId);
369 369
	if(flag==0&&operationStatus==1)
@ -391,14 +391,14 @@ $("#consd").on("click",".modification",function(){
391 391
				"success" : function(data) {
392 392
					if (data.success) {					
393 393
						//location.reload(true);
394
						alert("jjjjjjjjjjjjjj");
395
						console.log(data);
394
						//alert("jjjjjjjjjjjjjj");
395
						//console.log(data);
396 396
					} else {
397 397
						alert(data.msg);
398 398
					}
399 399
				},
400 400
			"beforeSend":function(){
401
				console.log(this.data);
401
				//console.log(this.data);
402 402
			},
403 403
			});
404 404
		})
@ -459,7 +459,7 @@ $.ajax({
459 459
						$(".loginStatus").eq(i).attr("resourId",data.data[i].resource.resourceId);
460 460
						$(".loginStatus").eq(i).attr("operationStatus",data.data[i].operationStatus);
461 461
						$(".loginStatus").eq(i).attr("operationId",data.data[i].operationId);
462
						console.log($(".loginStatus").eq(i).attr("operationId"));
462
						//console.log($(".loginStatus").eq(i).attr("operationId"));
463 463
							switch(data.data[i].operationStatus)
464 464
							{
465 465
							case 1:
@ -521,14 +521,14 @@ $(".workmysrc").on("click",".loginStatus",function(){
521 521
							"type" : "put",
522 522
							"success" : function(rdata) {
523 523
								if (rdata.success) {
524
									console.log(rdata);
524
									//console.log(rdata);
525 525
								} else {
526
									alert("jjj");
526
									//alert("jjj");
527 527
								}
528 528
							},
529 529
							"data" :  JSON.stringify($data) ,
530 530
							"contentType" :"application/json",
531
							"beforeSend":function(){console.log(this.data)},
531
							"beforeSend":function(){/*console.log(this.data)*/},
532 532
							dataType : "json"
533 533
						});
534 534
				});
@ -597,7 +597,7 @@ function upStatus(operationId,n){
597 597
			}
598 598
		},
599 599
		"data" :{"operationId":operationId,"operationStatus":n},
600
		"beforeSend":function(){console.log(this.data)},
600
		"beforeSend":function(){/*console.log(this.data)*/},
601 601
		"contentType" :"application/x-www-form-urlencoded",
602 602
		dataType : "json"
603 603
	});

+ 3 - 12
src/main/webapp/page/photo-set1.html

@ -109,12 +109,8 @@ $(function (){
109 109
	var id =getUrlParameter("id");
110 110
	console.log(id);
111 111
	var cacheImageKey=null;
112
	var servPath = "http://121.42.53.174:81";
113 112
	if(id){
114
		$("#headImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
115
//		$("#smallImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
116
//		$("#middleImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
117
//		$("#largeImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
113
		$("#headImage").attr("src","/images/head/"+id+"_l.jpg");
118 114
		$('#uploadInput').live('change',function(){ 
119 115
			$("#jcropdiv").show();
120 116
			$(".load").hide();
@ -126,10 +122,7 @@ $(function (){
126 122
				success:function($data){
127 123
					if($data.success){
128 124
						cacheImageKey =$data.data[0].cacheKey
129
						$("#headImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
130
//						$("#smallImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
131
//						$("#middleImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
132
//						$("#largeImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
125
						$("#headImage").attr("src","/images/tmp/"+cacheImageKey);
133 126
					}else{
134 127
						alert($data.msg);
135 128
					}
@ -169,9 +162,7 @@ $(function (){
169 162
		$(".load").show();
170 163
		$("#jcropdiv").hide();
171 164
		$("#headImage").attr("src","");
172
//		$("#smallImage").attr("src","");
173
//		$("#middleImage").attr("src","");
174
//		$("#largeImage").attr("src","");
165

175 166
	})
176 167

177 168
	$("#back").on("click",function(){

+ 835 - 0
src/main/webapp/professor.html

@ -0,0 +1,835 @@
1
<!DOCTYPE html>
2
<html lang="zh-cmn-Hans">
3
<head>
4
<meta charset="utf-8">
5
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6
<meta name="viewport" content="width=device-width, initial-scale=1">
7
<meta name="description" content="">
8
<meta name="author" content="">
9
<title>专家用户信息编辑</title>
10
<link href="css/bootstrap.min.css" rel="stylesheet">
11
<style>
12
	#raLists{
13
		background-color: #fff;
14
	    border: 1px solid #ccc;
15
	    border-radius: 4px;
16
	    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
17
	    box-sizing: border-box;
18
	    cursor: text;
19
	    margin: 0 0 15px 0;
20
	    min-height: 32px;
21
	    overflow: hidden;
22
	    padding: 0;
23
	    position: relative;
24
	    transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
25
	    width: 100%;
26
	}
27
	#raLists::before,#raLists::after{
28
		content: " ";
29
    	display: table;
30
	}
31
	#raLists > li{
32
		background-clip: padding-box;
33
	    background-color: #f1f1f1;
34
	    border: 1px solid #ddd;
35
	    border-radius: 3px;
36
	    box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
37
	    cursor: default;
38
	    line-height: 12px;
39
	    padding: 3px 20px 3px 5px;
40
	    position: relative;
41
	    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1) 0s;
42
	    display: block;
43
	    float: left;
44
	    list-style: outside none none;
45
	    margin: 5px 0 0 6px;
46
	}
47
	#raLists > li > .raDescp{
48
		display:none
49
	}
50
	#raLists > li > .raClose{
51
		  color: #000;
52
	    display: block;
53
	    font-size: 15.6px;
54
	    font-weight: 700;
55
	    height: 20px;
56
	    line-height: 14px;
57
	    opacity: 0.2;
58
	    position: absolute;
59
	    right: 0;
60
	    text-align: center;
61
	    text-shadow: 0 1px 0 #fff;
62
	    top: 0;
63
	    width: 20px;
64
	}
65
	
66
</style>
67
</head>
68
<body>
69
	<div class="container">
70
		<div class="page-header">
71
			<h1>专家用户信息</h1>
72
		</div>
73
		<div class="row">
74
			<div class="col-sm-3">
75
			</div>
76
			<div class="col-sm-6">
77
				<form class="form-horizontal">
78
					<div class="form-group">
79
						<label for="name" class="col-sm-2 control-label">姓名</label>
80
						<div class="col-sm-10">
81
							<input type="text" class="form-control" id="name" placeholder="姓名">
82
						</div>
83
					</div>
84
					<div class="form-group">
85
						<label for="title" class="col-sm-2 control-label">职称</label>
86
						<div class="col-sm-10">
87
							<input type="text" class="form-control" id="title" placeholder="职称">
88
						</div>
89
					</div>
90
					<div class="form-group">
91
						<label for="orgName" class="col-sm-2 control-label">机构</label>
92
						<div class="col-sm-10">
93
							<input type="hidden" id="orgId" /> <input type="text" class="form-control" id="orgName" placeholder="机构">
94
						</div>
95
					</div>
96
					<div class="form-group">
97
						<label for="department" class="col-sm-2 control-label">部门</label>
98
						<div class="col-sm-10">
99
							<input type="text" class="form-control" id="department" placeholder="部门">
100
						</div>
101
					</div>
102
					<div class="form-group">
103
						<label for="address" class="col-sm-2 control-label">住址</label>
104
						<div class="col-sm-10">
105
							<input type="text" class="form-control" id="address" placeholder="住址">
106
						</div>
107
					</div>
108
					<div class="col-sm-2"></div>
109
					<div class="col-sm-10">
110
						<button id="saveProfessor" type="button" class="btn btn-default">保存</button>
111
					</div>
112
				</form>
113
			</div>
114
			<div class="col-sm-3">
115
			</div>
116
		</div>
117
<div class="container" style="height:15px;"></div>
118
	<script src="/js/jquery-1.11.1.js"></script>
119
	<script src="/js/bootstrap.min.js"></script>
120
	<script type="text/javascript">
121
		$(function() {
122
			var getUrlParameter = function(sParam) {
123
				var sPageURL = decodeURIComponent(window.location.search.substring(1));
124
				var sURLVariables = sPageURL.split('&'), sParameterName, i;
125
				for (i = 0; i < sURLVariables.length; i++) {
126
					sParameterName = sURLVariables[i].split('=');
127
					if (sParameterName[0] === sParam) {
128
						return sParameterName[1] === undefined ? true
129
								: sParameterName[1];
130
					}
131
				}
132
			};
133
			 $("#headChange").on("click",function (){
134
	   		var headChange1 =getUrlParameter("id"); 
135
	   		location.href = "photo-set1.html?id="+encodeURI(headChange1);
136
	   })
137
			var fillRA=function($caption,$descp){
138
				$li =$("<li></li>").addClass("rablock");
139
				$("<span></span>").html($caption).addClass("raCaption").appendTo($li);
140
				$("<span></span>").html($descp?$descp:"").addClass("raDescp").appendTo($li);
141
				$("<div></div>").html("X").addClass("raClose").appendTo($li);
142
				$li.appendTo($("#raLists"));					
143
			};
144
			var gtd = function($val, $dval) {
145
				var $rd = $("<td></td>");
146
				if (typeof $val === "boolean") {
147
					$rd.html($val ? "是" : "否");
148
				} else if ($val) {
149
					$rd.html($val);
150
				} else if ($dval) {
151
					$rd.html($dval)
152
				}
153
				return $rd;
154
			};
155
			var gtr = function($data, $col, $prefix) {
156
				var $row = $("<tr></tr>");
157
				if ($data.id) {
158
					$row.data("pid", $data.id);
159
				}
160
				for (var i = 0; i < $col.length; ++i) {
161
					var pn = $col[i];
162
					var ind = pn.indexOf(":");
163
					var cn = pn;
164
					var dn = "";
165
					if (ind > 0) {
166
						cn = pn.substring(0, ind);
167
						++ind;
168
						dn = pn.substring(ind);
169
					}
170
					gtd($data[cn], dn).appendTo($row);
171
				}
172
				$optd = $("<td></td>");
173
				$("<button type='button'></button>").html("编辑").addClass($prefix + "Edit").appendTo($optd);
174
				$("<button type='button'></button>").html("删除").addClass($prefix + "Del").appendTo($optd);
175
				$optd.appendTo($row);
176
				return $row;
177
			};
178
			var gtbody = function($data, $tbody, $col, $prefix) {
179
				for (var i = 0; i < $data.length; ++i) {
180
					gtr($data[i], $col, $prefix).appendTo($tbody);
181
				}
182
			}
183
184
			var addJob = function($data) {
185
				gtbody($data, $("#job_tbody"), [ "startMonth", "stopMonth:--",
186
						"company", "title", "descp" ], "job");
187
			};
188
			var addHonor = function($data) {
189
				gtbody($data, $("#honor_tbody"), [ "year", "name", "descp" ],
190
						"honor");
191
			};
192
			var addPatent = function($data) {
193
				gtbody($data, $("#patent_tbody"), [ "year", "name", "url",
194
						"descp" ], "patent");
195
			};
196
			var addProject = function($data) {
197
				gtbody($data, $("#project_tbody"), [ "startMonth",
198
						"stopMonth:--", "name", "descp" ], "project");
199
			};
200
			var addRA = function($datas) {
201
				for(var i =0 ; i< $datas.length;++i){
202
					var $data = $datas[i];
203
					var $row = $("<tr></tr>");
204
					$("<td></td>").html($data.caption).appendTo($row);
205
					$("<td></td>").html($data.count).appendTo($row);
206
					if ($data.descp) {
207
						$("<td></td>").html($data.descp).appendTo($row);
208
					} else {
209
						$("<td></td>").html("").appendTo($row);
210
					}
211
					$row.appendTo($("#ra_tbody"));
212
				}
213
			};
214
			var addEdu = function($data) {
215
				gtbody($data, $("#edu_tbody"), [ "year", "school", "college",
216
						"major", "student", "degree", "descp" ], "edu");
217
			};
218
			var addPaper = function($data) {
219
				gtbody($data, $("#paper_tbody"), [ "year", "name", "url","descp" ], "paper");
220
			};
221
222
			var professorId = getUrlParameter("id");
223
			if (professorId) {
224
				$.get("../ajax/professor/info/" + professorId, function($data) {
225
					if ($data.success) {
226
						var $info = $data.data;
227
						if ($info) {
228
							$("#name").val($info.name);
229
							$("#title").val($info.title);
230
							$("#orgId").val($info.orgId);
231
							$("#orgName").val($info.orgName);
232
							$("#department").val($info.department);
233
							$("#subject").val($info.subject);
234
							$("#industry").val($info.industry);
235
							$("#address").val($info.address);
236
							$("#descp").val($info.descp);
237
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
238
							$("#orgImage").attr("src","/images/org/"+$info.orgId+".jpg");
239
							if ($info.researchAreas) {
240
								addRA($info.researchAreas);
241
							}
242
							if ($info.edus) {
243
								addEdu($info.edus);
244
							}
245
							if ($info.jobs) {
246
								addJob($info.jobs);
247
							}
248
							if ($info.papers) {
249
								addPaper($info.papers);
250
							}
251
							if ($info.patents) {
252
								addPatent($info.patents);
253
							}
254
							if ($info.honors) {
255
								addHonor($info.honors);
256
							}
257
							if ($info.projects) {
258
								addProject($info.projects)
259
							}
260
							$("#saveSubject").on("click",function(){
261
								$.ajax({"url" : "../ajax/professor/subject",
262
									"type" : "POST",
263
									"data" : {"id":professorId,"subject":$("#subject").val()},
264
									"contentType" : "application/x-www-form-urlencoded",
265
									"success" : function($data) {
266
										if ($data.success) {
267
											alert("save subject ok");
268
										} else {
269
											alert($data.msg);
270
										}
271
									}
272
								});
273
							});
274
							$("#saveIndustry").on("click",function(){
275
								$.ajax({"url" : "../ajax/professor/industry",
276
									"type" : "POST",
277
									"data" : {"id":professorId,"industry":$("#industry").val()},
278
									"contentType" : "application/x-www-form-urlencoded",
279
									"success" : function($data) {
280
										if ($data.success) {
281
											alert("save industry ok");
282
										} else {
283
											alert($data.msg);
284
										}
285
									}
286
								});
287
							});
288
							$("#saveAddress").on("click",function(){
289
								$.ajax({"url" : "../ajax/professor/address",
290
									"type" : "POST",
291
									"data" : {"id":professorId,"address":$("#address").val()},
292
									"contentType" : "application/x-www-form-urlencoded",
293
									"success" : function($data) {
294
										if ($data.success) {
295
											alert("save address ok");
296
										} else {
297
											alert($data.msg);
298
										}
299
									}
300
								});
301
							});
302
							$("#saveDescp").on("click",function(){
303
								$.ajax({"url" : "../ajax/professor/descp",
304
									"type" : "POST",
305
									"data" : {"id":professorId,"descp":$("#descp").val()},
306
									"contentType" : "application/x-www-form-urlencoded",
307
									"success" : function($data) {
308
										if ($data.success) {
309
											alert("save descp ok");
310
										} else {
311
											alert($data.msg);
312
										}
313
									}
314
								});
315
							});
316
							$("#raLabel").on("click", function() {
317
								$.get("../ajax/researchArea/"+professorId,function($data){
318
									if($data.success){
319
										if($data.data){
320
										$('#raLists').empty();
321
											var $ras = $data.data;
322
											for(var i = 0 ; i < $ras.length;++i){
323
												fillRA($ras[i].caption,$ras[i].descp);
324
											}
325
										}
326
									}else{
327
										alert($data.msg);
328
									}
329
								});
330
								$("#raModal").modal();
331
							});
332
							$("#raNew").on("click",function(){
333
								fillRA($("#raCaption").val(),$("#raDescp").val());
334
								$("#raCaption").val("");
335
								$("#raDescp").val("");
336
								return false;
337
							});
338
							$("#raSubmit").on("click",function(){
339
								var $data=[];
340
								$("#raLists > li").each(function(){
341
									var $rd ={};
342
									$this = $(this);
343
									$rd.professorId = professorId;
344
									$rd.caption=$this.children(".raCaption").html();
345
									$rd.descp=$this.children(".raDescp").html();
346
									if(!$rd.descp) delete $rd.descp;
347
									$data[$data.length]=$rd;
348
								});
349
								var $has = $data.length>0;
350
								$.ajax({
351
									"url" : $has?"../ajax/researchArea":"../ajax/researchArea/"+professorId,
352
									"type" : $has? "PUT" : "DELETE",
353
									"data" : $has ? JSON.stringify($data) : null,
354
									"contentType" : $has ? "application/json": "application/x-www-form-urlencoded",
355
									"success" : function($data) {
356
										if ($data.success) {
357
											location.reload(true);
358
										} else {
359
											alert($data.msg);
360
										}
361
									}
362
								});
363
								
364
							});
365
							setInterval(function(){
366
							$(".raClose").on("click",function(){
367
								
368
								$this=$(this);
369
								$this.parent().remove();
370
								return false;
371
							});
372
							},1000);
373
							
374
							$("#jobLabel").on("click",function(){
375
								$("#jobModal").data("pid", "");
376
								$("#job_startMonth").val("");
377
								$("#job_stopMonth").val("");
378
								$("#job_company").val("");
379
								$("#job_title").val("");
380
								$("#job_descp").val("");
381
								$("#jobModal").modal();
382
							});
383
							$(".jobEdit")	.on("click",function() {
384
								var $id = $(this).parent().parent().data("pid");
385
								$("#jobModal").data("pid", $id);
386
								$.get("../ajax/job/" + $id,function($data) {
387
									if ($data.success) {
388
										$info = $data.data;
389
										$("#job_startMonth").val($info.startMonth);
390
										$("#job_stopMonth").val($info.stopMonth ? $info.stopMonth: "");
391
										$("#job_company").val($info.company ? $info.company: "");
392
										$("#job_title").val($info.title ? $info.title: "");
393
										$("#job_descp").val($info.descp ? $info.descp: "");
394
										$("#jobModal").modal();
395
									} else {
396
										alert($data.msg);
397
									}
398
								});
399
							});
400
							$(".jobDel").on("click", function() {
401
								var $id = $(this).parent().parent().data("pid");
402
								$.ajax({
403
									"url" : "../ajax/job/" + $id,
404
									"type" : "DELETE",
405
									"success" : function($data) {
406
										if ($data.success) {
407
											location.reload(true);
408
										} else {
409
											alert($data.msg);
410
										}
411
									}
412
								});
413
							});
414
							$("#jobSubmit").on("click",function(){
415
								var $data = {};
416
								var $id = $("#jobModal").data("pid");
417
								if ($id) $data.id = $id;
418
								$data.professorId = professorId;
419
								$data.startMonth = $("#job_startMonth").val();
420
								$data.stopMonth = $("#job_stopMonth").val();
421
								if (!$data.stopMonth)
422
									delete $data.stopMonth;
423
								$data.company = $("#job_company").val();
424
								$data.title = $("#job_title").val();
425
								$data.descp = $("#job_descp").val();
426
								if (!$data.descp)
427
									delete $data.descp;
428
								$.ajax({
429
									"url" : "../ajax/job",
430
									"type" : $id ? "PUT" : "POST",
431
									"data" : $id ? JSON.stringify($data) : $data,
432
									"contentType" : $id ? "application/json"
433
											: "application/x-www-form-urlencoded",
434
									"success" : function($data) {
435
										if ($data.success) {
436
											location.reload(true);
437
										} else {
438
											alert($data.msg);
439
										}
440
									}
441
								});
442
							});
443
							$("#projectLabel").on("click", function() {
444
								$("#projectModal").data("pid", "");
445
								$("#project_startMonth").val("");
446
								$("#project_stopMonth").val("");
447
								$("#project_name").val("");
448
								$("#project_descp").val("");
449
								$("#projectModal").modal();
450
							});
451
							$(".projectEdit").on("click",function() {
452
								var $id = $(this).parent().parent().data("pid");
453
								$("#projectModal").data("pid", $id);
454
								$.get("../ajax/project/" + $id,function($data) {
455
									if ($data.success) {
456
										$info = $data.data;
457
										$("#project_startMonth").val($info.startMonth ? $info.startMonth: "");
458
										$("#project_stopMonth").val($info.stopMonth ? $info.stopMonth: "");
459
										$("#project_name").val($info.name ? $info.name: "");
460
										$("#project_descp").val($info.descp ? $info.descp: "");
461
										$("#projectModal").modal();
462
									} else {
463
										alert($data.msg);
464
									}
465
								});
466
							});
467
							$(".projectDel").on("click", function() {
468
								var $id = $(this).parent().parent().data("pid");
469
								$.ajax({
470
									"url" : "../ajax/project/" + $id,
471
									"type" : "DELETE",
472
									"success" : function($data) {
473
										if ($data.success) {
474
											location.reload(true);
475
										} else {
476
											alert($data.msg);
477
										}
478
									}
479
								});
480
							});
481
							$("#projectSubmit").on("click",function() {
482
								var $data = {};
483
								var $id = $("#projectModal").data("pid");
484
								if ($id)
485
									$data.id = $id;
486
								$data.professorId = professorId;
487
								$data.startMonth = $("#project_startMonth").val();
488
								$data.stopMonth = $("#project_stopMonth").val();
489
								if (!$data.stopMonth)
490
									delete $data.stopMonth;
491
								$data.name = $("#project_name").val();
492
								$data.descp = $("#project_descp").val();
493
								if (!$data.descp)
494
									delete $data.descp;
495
								$.ajax({
496
									"url" : "../ajax/project",
497
									"type" : $id ? "PUT" : "POST",
498
									"data" : $id ? JSON.stringify($data) : $data,
499
									"contentType" : $id ? "application/json"
500
											: "application/x-www-form-urlencoded",
501
									"success" : function($data) {
502
										if ($data.success) {
503
											location.reload(true);
504
										} else {
505
											alert($data.msg);
506
										}
507
									}
508
								});
509
							});
510
							$("#honorLabel").on("click", function() {
511
								$("honorModal").data("pid", "");
512
								$("#honor_year").val("");
513
								$("#honor_name").val("");
514
								$("#honor_descp").val("");
515
								$("#honorModal").modal();
516
							});
517
							$(".honorEdit").on("click", function() {
518
								var $id = $(this).parent().parent().data("pid");
519
								$("#honorModal").data("pid", $id);
520
								$.get("../ajax/honor/" + $id, function($data) {
521
									if ($data.success) {
522
										$info = $data.data;
523
										$("#honor_year").val($info.year ? $info.year : "");
524
										$("#honor_name").val($info.name ? $info.name : "");
525
										$("#honor_descp").val($info.descp ? $info.descp : "");
526
										$("#honorModal").modal();
527
									} else {
528
										alert($data.msg);
529
									}
530
								});
531
							});
532
							$(".honorDel").on("click", function() {
533
								var $id = $(this).parent().parent().data("pid");
534
								$.ajax({
535
									"url" : "../ajax/honor/" + $id,
536
									"type" : "DELETE",
537
									"success" : function($data) {
538
										if ($data.success) {
539
											location.reload(true);
540
										} else {
541
											alert($data.msg);
542
										}
543
									}
544
								});
545
							});
546
							$("#honorSubmit").on("click",function() {
547
								var $data = {};
548
								var $id = $("#honorModal").data("pid");
549
								if ($id)
550
									$data.id = $id;
551
								$data.professorId = professorId;
552
								$data.year = $("#honor_year").val();
553
								$data.name = $("#honor_name").val();
554
								$data.descp = $("#honor_descp").val();
555
								if (!$data.descp)
556
									delete $data.descp;
557
								$.ajax({
558
									"url" : "../ajax/honor",
559
									"type" : $id ? "PUT" : "POST",
560
									"data" : $id ? JSON.stringify($data) : $data,
561
									"contentType" : $id ? "application/json"
562
											: "application/x-www-form-urlencoded",
563
									"success" : function($data) {
564
										if ($data.success) {
565
											location.reload(true);
566
										} else {
567
											alert($data.msg);
568
										}
569
									}
570
								});
571
							});
572
							$("#eduLabel").on("click", function() {
573
								$("#eduModal").data("pid", "");
574
								$("#edu_year").val("");
575
								$("#edu_school").val("");
576
								$("#edu_college").val("");
577
								$("#edu_major").val("");
578
								$("#edu_degree").val("");
579
								$("#edu_descp").val("");
580
								$("#eduModal").modal();
581
							});
582
							$(".eduEdit").on("click",function(){
583
								var $id = $(this).parent().parent().data("pid");
584
								$("#eduModal").data("pid", $id);
585
								$.get("../ajax/edu/" + $id, function($data) {
586
									if ($data.success) {
587
										$info = $data.data;
588
										$("#edu_year").val($info.year ? $info.year : "");
589
										$("#edu_school").val($info.school ? $info.school : "");
590
										$("#edu_college").val($info.college ? $info.college : "");
591
										$("#edu_major").val($info.major ? $info.major : "");
592
										$("#edu_degree").val($info.degree ? $info.degree : "");
593
										$("#edu_descp").val($info.descp ? $info.descp : "");
594
										$("#edu_student_YES").removeAttr("checked");
595
										$("#edu_student_NO").removeAttr("checked");
596
										if ($info.student) {
597
											$("#edu_student_YES").get(0).checked=true;
598
										} else {
599
											$("#edu_student_NO").get(0).checked=true;
600
										}
601
										$("#eduModal").modal();
602
									} else {
603
										alert($data.msg);
604
									}
605
								});
606
							});
607
							$(".eduDel").on("click", function() {
608
								var $id = $(this).parent().parent().data("pid");
609
								$.ajax({
610
									"url" : "../ajax/edu/" + $id,
611
									"type" : "DELETE",
612
									"success" : function($data) {
613
										if ($data.success) {
614
											location.reload(true);
615
										} else {
616
											alert($data.msg);
617
										}
618
									}
619
								});
620
							});
621
							$("#eduSubmit").on("click",function(){
622
								var $data = {};
623
								var $id = $("#eduModal").data("pid");
624
								if ($id)
625
									$data.id = $id;
626
								$data.professorId = professorId;
627
								$data.year = $("#edu_year").val();
628
								if (!$data.year)
629
									delete $data.year;
630
								$data.school = $("#edu_school").val();
631
								$data.descp = $("#edu_descp").val();
632
								if (!$data.descp)
633
									delete $data.descp;
634
								$data.college = $("#edu_college").val();
635
								if (!$data.college)
636
									delete $data.college;
637
								$data.major = $("#edu_major").val();
638
								if (!$data.major)
639
									delete $data.major;
640
								$data.degree = $("#edu_degree").val();
641
								if (!$data.degree)
642
									delete $data.degree;
643
								$data.student = $("#edu_student_YES").get(0).checked;
644
								$.ajax({
645
									"url" : "../ajax/edu",
646
									"type" : $id ? "PUT" : "POST",
647
									"data" : $id ? JSON.stringify($data) : $data,
648
									"contentType" : $id ? "application/json"
649
											: "application/x-www-form-urlencoded",
650
									"success" : function($data) {
651
										if ($data.success) {
652
											location.reload(true);
653
										} else {
654
											alert($data.msg);
655
										}
656
									}
657
								});
658
							});
659
							$("#paperLabel").on("click", function() {
660
								$("#paperModal").data("pid", "");
661
								$("#paper_year").val("");
662
								$("#paper_name").val("");
663
								$("#paper_url").val("");
664
								$("#paper_descp").val("");
665
								$("#paperModal").modal();
666
							});
667
							$(".paperEdit").on("click", function() {
668
								var $id = $(this).parent().parent().data("pid");
669
								$("#paperModal").data("pid", $id);
670
								$.get("../ajax/paper/" + $id, function($data) {
671
									if ($data.success) {
672
										$info = $data.data;
673
										$("#paper_year").val($info.year ? $info.year : "");
674
										$("#paper_name").val($info.name ? $info.name : "");
675
										$("#paper_url").val($info.url ? $info.url : "");
676
										$("#paper_descp").val($info.descp ? $info.descp : "");
677
										$("#paperModal").modal();
678
									} else {
679
										alert($data.msg);
680
									}
681
								});
682
							});
683
							$(".paperDel").on("click", function() {
684
								var $id = $(this).parent().parent().data("pid");
685
								$.ajax({
686
									"url" : "../ajax/paper/" + $id,
687
									"type" : "DELETE",
688
									"success" : function($data) {
689
										if ($data.success) {
690
											location.reload(true);
691
										} else {
692
											alert($data.msg);
693
										}
694
									}
695
								});
696
							});
697
							$("#paperSubmit").on("click",function() {
698
								var $data = {};
699
								var $id = $("#paperModal").data("pid");
700
								if ($id)
701
									$data.id = $id;
702
								$data.professorId = professorId;
703
								$data.year = $("#paper_year").val();
704
								if (!$data.year)
705
									delete $data.year;
706
								$data.name = $("#paper_name").val();
707
								$data.descp = $("#paper_descp").val();
708
								if (!$data.descp)
709
									delete $data.descp;
710
								$data.url = $("#paper_url").val();
711
								if (!$data.url)
712
									delete $data.url;
713
								$.ajax({
714
									"url" : "../ajax/paper",
715
									"type" : $id ? "PUT" : "POST",
716
									"data" : $id ? JSON.stringify($data) : $data,
717
									"contentType" : $id ? "application/json"
718
											: "application/x-www-form-urlencoded",
719
									"success" : function($data) {
720
										if ($data.success) {
721
											location.reload(true);
722
										} else {
723
											alert($data.msg);
724
										}
725
									}
726
								});
727
							});
728
							$("#patentLabel").on("click", function() {
729
								$("#patentModal").data("pid", "");
730
								$("#patent_year").val("");
731
								$("#patent_name").val("");
732
								$("#patent_url").val("");
733
								$("#patent_descp").val("");
734
								$("#patentModal").modal();
735
							});
736
							$(".patentEdit").on("click", function() {
737
								var $id = $(this).parent().parent().data("pid");
738
								$("#patentModal").data("pid", $id);
739
								$.get("../ajax/patent/" + $id, function($data) {
740
									if ($data.success) {
741
										$info = $data.data;
742
										$("#patent_year").val($info.year ? $info.year : "");
743
										$("#patent_name").val($info.name ? $info.name : "");
744
										$("#patent_url").val($info.url ? $info.url : "");
745
										$("#patent_descp").val($info.descp ? $info.descp : "");
746
										$("#patentModal").modal();
747
									} else {
748
										alert($data.msg);
749
									}
750
								});
751
							});
752
							$(".patentDel").on("click", function() {
753
								var $id = $(this).parent().parent().data("pid");
754
								$.ajax({
755
									"url" : "../ajax/patent/" + $id,
756
									"type" : "DELETE",
757
									"success" : function($data) {
758
										if ($data.success) {
759
											location.reload(true);
760
										} else {
761
											alert($data.msg);
762
										}
763
									}
764
								});
765
							});
766
							$("#patentSubmit").on("click",function() {
767
								var $data = {};
768
								var $id = $("#patentModal").data("pid");
769
								if ($id)
770
									$data.id = $id;
771
								$data.professorId = professorId;
772
								$data.year = $("#patent_year").val();
773
								if (!$data.year)
774
									delete $data.year;
775
								$data.name = $("#patent_name").val();
776
								$data.descp = $("#patent_descp").val();
777
								if (!$data.descp)
778
									delete $data.descp;
779
								$data.url = $("#patent_url").val();
780
								if (!$data.url)
781
									delete $data.url;
782
								$.ajax({
783
									"url" : "../ajax/patent",
784
									"type" : $id ? "PUT" : "POST",
785
									"data" : $id ? JSON.stringify($data) : $data,
786
									"contentType" : $id ? "application/json"
787
											: "application/x-www-form-urlencoded",
788
									"success" : function($data) {
789
										if ($data.success) {
790
											location.reload(true);
791
										} else {
792
											alert($data.msg);
793
										}
794
									}
795
								});
796
							});
797
						}
798
					} else {
799
						alert($data.msg);
800
					}
801
				});	
802
			}
803
804
			$("#saveProfessor").on("click",	function() {
805
				var $data = {};
806
				$data.name = $("#name").val();
807
				$data.orgId = $("#orgId").val();
808
				$data.orgName = $("#orgName").val();
809
				$data.title = $("#title").val();
810
				$data.department = $("#department").val();
811
				$data.address = $("#address").val();
812
				$data.id = professorId;
813
				$.ajax({"url" : "../ajax/professor",
814
							"type" :  "POST",
815
							"success" : function(rdata) {
816
								console.log(rdata);
817
								if (rdata.success) {
818
									
819
										location.href="login.html"									
820
								} else {
821
									alert(rdata.msg);
822
								}
823
							},
824
							"data" : $data,
825
							"contentType" :"application/x-www-form-urlencoded",
826
							dataType : "json"
827
						});
828
			});
829
830
		
831
832
		});
833
	</script>
834
</body>
835
</html>

+ 18 - 8
src/main/webapp/register.html

@ -55,15 +55,23 @@
55 55
                                                <li><div class="msg msgphone2"><span></span></div></li>
56 56
                                                <li class="coderli">
57 57
                                                    <input class="inputtxt" type="text" placeholder="请输入手机验证码" id="lp_coder" name="coder" autocomplete="on">
58
                                                    <span class="getcode">获取验证码</span>
58
                                                    <span class="getcode getcode1"id="getcode">获取验证码</span>
59 59
                                                </li>
60 60
                                                <li> <div class="msg msgphone3"><span></span></div></li>
61 61
                                                <li>
62 62
                                                    <input class="inputtxt" type="password" placeholder="请设置密码" id="phone_password" name="password" autocomplete="off">
63 63
                                                </li>
64 64
                                                <li><div class="msg msgphone4"><span></span></div></li>
65
                                                
65
                                                 <li>
66
                                                    <input class="inputtxt" type="password" placeholder="请再次输入密码" id="phone_password2" name="password" autocomplete="off">
67
                                                </li>
68
                                                <li><div class="msg msgphone5"><span></span></div></li>
66 69
                                            </ul>
70
                                            <label for="agreeNotice" class="agreeNotice" checked="true"> 
71
                                             <em style="background-position: 0px -12px;"></em> 
72
                                             <input type="checkbox" name="checkbox" checked="true" class="gree" style="display:none;">我已阅读并同意<a href="" target="_blank" >《科袖网用户协议》</a>
73
                                        </label> 
74
                                        <a  class="inputtxt submitBtn"id="btnn">注册</a>  
67 75
                                        </form>
68 76
                                        <form id="mail_form" method="post" action="javascript:;" >
69 77
                                            <ul>
@ -75,16 +83,18 @@
75 83
                                                    <input class="inputtxt" type="password" placeholder="请输入密码" id="mail_password" name="password" autocomplete="off">
76 84
                                                </li>
77 85
                                                <li><div class="msg msgema2"><span></span></div></li>
86
                                                <li>
87
                                                    <input class="inputtxt" type="password" placeholder="请输入密码" id="mail_password1" name="password" autocomplete="off">
88
                                                </li>
89
                                                <li><div class="msg msgema3"><span></span></div></li>
78 90
                                            </ul>
79
                                         </form> 
80
                                     </div> 
81
                                     <form>
82
                                         <label for="agreeNotice" class="agreeNotice" checked="true"> 
91
                                            <label for="agreeNotice" class="agreeNotice" checked="true"> 
83 92
                                             <em style="background-position: 0px -12px;"></em> 
84 93
                                             <input type="checkbox" name="checkbox" checked="true" class="gree" style="display:none;">我已阅读并同意<a href="" target="_blank" >《科袖网用户协议》</a>
85 94
                                        </label> 
86
                                        <a href="javascript:void(0);" class="inputtxt submitBtn">注册</a>  
87
                                    </form>
95
                                        <a  class="inputtxt submitBtn"id="btnn1">注册</a>  
96
                                         </form> 
97
                                     </div> 
88 98
                                </div>
89 99
                            </div> 
90 100
                        </td>

+ 10 - 3
src/main/webapp/workspaces.html

@ -5,11 +5,18 @@
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7
<title>科袖-我的工作台</title>
8
<link href="css/bootstrap.min.css" rel="stylesheet">
9
<link href="css/reset.css" rel="stylesheet" />
8
<link type="text/css" href="css/bootstrap.min.css" rel="stylesheet">
9
<link type="text/css" href="css/reset.css" rel="stylesheet" />
10 10
<link type="text/css" href="css/common.css" rel="stylesheet">
11 11
<link type="text/css" href="css/workspace.css" rel="stylesheet">
12
<link type="text/css" href="css/popup.css" rel="stylesheet">
12 13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
14

15
<script type="text/javascript" src="js/jquery.HeadP.js"> </script>
16
<script type="text/javascript" src="js/jquery.Jcrop.js"> </script>
17
<script type="text/javascript" src="js/basic.js"> </script>
18
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
19

13 20
<script type="text/javascript"src="js/jquery.cookie.js"></script>
14 21
<script type="text/javascript"src="js/jquery.similar.msgbox.js"></script>
15 22
<script type="text/javascript" src="js/index.js"></script>
@ -17,7 +24,7 @@
17 24
<script type="text/javascript" src="js/workspace.js"></script>
18 25
</head>
19 26

20
<body>
27
<body onload="GuestbookInfo();">
21 28

22 29
<div id="header">
23 30
	<a href="index.html" alt="科袖" class="logo"></a>