ソースを参照

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

zzy.zhiyuan.foxmail 8 年 前
コミット
a5b0534925
共有1 個のファイルを変更した23 個の追加1 個の削除を含む
  1. 23 1
      src/main/webapp/page/professor.html

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

100
							<input type="text" class="form-control" id="department" placeholder="部门">
100
							<input type="text" class="form-control" id="department" placeholder="部门">
101
						</div>
101
						</div>
102
					</div>
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
					<div class="col-sm-2"></div>
109
					<div class="col-sm-2"></div>
104
					<div class="col-sm-10">
110
					<div class="col-sm-10">
105
						<button id="saveProfessor" type="button" class="btn btn-default">保存</button>
111
						<button id="saveProfessor" type="button" class="btn btn-default">保存</button>
555
			</div>
561
			</div>
556
		</div>
562
		</div>
557
	</div>
563
	</div>
558
	<script src="../js/jquery.js"></script>
564
	<script src="../js/jquery-1.11.1.js"></script>
559
	<script src="../js/bootstrap.min.js"></script>
565
	<script src="../js/bootstrap.min.js"></script>
560
	<script type="text/javascript">
566
	<script type="text/javascript">
561
		$(function() {
567
		$(function() {
668
							$("#department").val($info.department);
674
							$("#department").val($info.department);
669
							$("#subject").val($info.subject);
675
							$("#subject").val($info.subject);
670
							$("#industry").val($info.industry);
676
							$("#industry").val($info.industry);
677
							$("#address").val($info.address);
671
							$("#descp").val($info.descp);
678
							$("#descp").val($info.descp);
672
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
679
							$("#headImage").attr("src","/images/head/"+professorId+"_l.jpg");
673
							$("#orgImage").attr("src","/images/org/"+$info.orgId+".jpg");
680
							$("#orgImage").attr("src","/images/org/"+$info.orgId+".jpg");
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
							$("#saveDescp").on("click",function(){
744
							$("#saveDescp").on("click",function(){
724
								$.ajax({"url" : "../ajax/professor/descp",
745
								$.ajax({"url" : "../ajax/professor/descp",
725
									"type" : "POST",
746
									"type" : "POST",
1225
				$data.orgName = $("#orgName").val();
1246
				$data.orgName = $("#orgName").val();
1226
				$data.title = $("#title").val();
1247
				$data.title = $("#title").val();
1227
				$data.department = $("#department").val();
1248
				$data.department = $("#department").val();
1249
				$data.address = $("#address").val();
1228
				if (professorId) {
1250
				if (professorId) {
1229
					$data.id = professorId;
1251
					$data.id = professorId;
1230
				}
1252
				}