Parcourir la Source

增加专家用户信息住址显示,修改引用的jquery.js插件为jquery-1.11.1.js

zzy.zhiyuan.foxmail 8 ans auparavant
Parent
commit
a5b0534925
1 fichiers modifiés avec 23 ajouts et 1 suppressions
  1. 23 1
      src/main/webapp/page/professor.html

+ 23 - 1
src/main/webapp/page/professor.html

@ -100,6 +100,12 @@
100 100
							<input type="text" class="form-control" id="department" placeholder="部门">
101 101
						</div>
102 102
					</div>
103
					<div class="form-group">
104
						<label for="address" class="col-sm-2 control-label">住址</label>
105
						<div class="col-sm-10">
106
							<input type="text" class="form-control" id="address" placeholder="住址">
107
						</div>
108
					</div>
103 109
					<div class="col-sm-2"></div>
104 110
					<div class="col-sm-10">
105 111
						<button id="saveProfessor" type="button" class="btn btn-default">保存</button>
@ -555,7 +561,7 @@
555 561
			</div>
556 562
		</div>
557 563
	</div>
558
	<script src="../js/jquery.js"></script>
564
	<script src="../js/jquery-1.11.1.js"></script>
559 565
	<script src="../js/bootstrap.min.js"></script>
560 566
	<script type="text/javascript">
561 567
		$(function() {
@ -668,6 +674,7 @@
668 674
							$("#department").val($info.department);
669 675
							$("#subject").val($info.subject);
670 676
							$("#industry").val($info.industry);
677
							$("#address").val($info.address);
671 678
							$("#descp").val($info.descp);
672 679
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
673 680
							$("#orgImage").attr("src","/images/org/"+$info.orgId+".jpg");
@ -720,6 +727,20 @@
720 727
									}
721 728
								});
722 729
							});
730
							$("#saveAddress").on("click",function(){
731
								$.ajax({"url" : "../ajax/professor/address",
732
									"type" : "POST",
733
									"data" : {"id":professorId,"address":$("#address").val()},
734
									"contentType" : "application/x-www-form-urlencoded",
735
									"success" : function($data) {
736
										if ($data.success) {
737
											alert("save address ok");
738
										} else {
739
											alert($data.msg);
740
										}
741
									}
742
								});
743
							});
723 744
							$("#saveDescp").on("click",function(){
724 745
								$.ajax({"url" : "../ajax/professor/descp",
725 746
									"type" : "POST",
@ -1225,6 +1246,7 @@
1225 1246
				$data.orgName = $("#orgName").val();
1226 1247
				$data.title = $("#title").val();
1227 1248
				$data.department = $("#department").val();
1249
				$data.address = $("#address").val();
1228 1250
				if (professorId) {
1229 1251
					$data.id = professorId;
1230 1252
				}