Преглед на файлове

1.9版本Firefox显示问题

luyanan преди 7 години
родител
ревизия
de93204be6
променени са 2 файла, в които са добавени 116 реда и са изтрити 115 реда
  1. 1 1
      css/genindex.css
  2. 115 114
      js/userInforShow.js

+ 1 - 1
css/genindex.css

@ -585,7 +585,7 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
585 585
.headconBox{padding:30px;min-height:200px;background: #fff;position: relative;margin-bottom: 20px;}
586 586
.bottomShow .shareCode{bottom:auto;top:30px;}
587 587
.bottomShow .shareCode:after{border:12px solid transparent;border-bottom-color:rgba(0,0,0,.6);top:-24px;left:22px;bottom:auto;}
588
.headconBox .headimgBox{width: 142px;height: 142px;position:absolute;overflow:hidden;border:1px solid #E5E5E5;border-radius:50%;background-image:url(../images/default-photo.jpg);background-size: cover;}
588
.headconBox .headimgBox{width: 142px;height: 142px;position:absolute;overflow:hidden;border:1px solid #E5E5E5;border-radius:50%;background-image:url(../images/default-photo.jpg);background-size: cover;top: 50%;margin-top: -71px;}
589 589
.headconBox .cmpimgBox{border-radius:0;background:#fff;}
590 590
.headconBox .reInfoBlock{width:100%;padding-left:170px;}
591 591
.headconBox .reInfoBlock .h1Font{font-size: 18px;color:#666;margin-bottom:10px;}

+ 115 - 114
js/userInforShow.js

@ -259,8 +259,112 @@ $(function() {
259 259
			$("#item5user").show();
260 260
		})
261 261
	}
262
	
263
	var subjectShow = function(data) {
262
	//用户详细信息
263
	function getUserInfo(professorId){
264
		$.ajax({
265
			type:"get",
266
			url:"/ajax/professor/info/"+ professorId,
267
			async:true,
268
			success: function(data) {
269
				var $info = data.data;
270
				if(data.success) {
271
					if($info.hasHeadImage){
272
						$("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
273
					}
274
					$("#proName").text($info.name);
275
					var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
276
					$("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
277
					if($info.address){
278
						$("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
279
					}
280
					var proOther="";
281
					if($info.orgName){
282
						if($info.department){
283
							if($info.office){
284
								proOther = $info.orgName + "," + $info.department + "," + $info.office
285
							}else{
286
								proOther = $info.orgName + "," + $info.department
287
							}
288
						}else{
289
							proOther = $info.orgName
290
						}
291
					}
292
					$("#proOther").text(proOther);
293
					var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
294
					if($info.title){
295
						$("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
296
						llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
297
					}
298
					document.title = llqtitle;
299
					
300
301
					//个人简介
302
					if($info.descp) {
303
						$("#descpS").parents(".coninfobox").removeClass("displayNone");
304
						$("#item1user>.nodatabox").addClass("displayNone");
305
						$("#descpS").text($info.descp);
306
					}
307
					//学术领域					
308
					if($info.subject) {
309
						$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
310
						$("#item1user>.nodatabox").addClass("displayNone");
311
						subjectShow($info.subject);
312
					}
313
					//研究方向
314
					if($info.researchAreas.length) {
315
						$("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
316
						$("#item1user>.nodatabox").addClass("displayNone");
317
						researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
318
					}
319
					//行业领域	
320
					if($info.industry) {
321
						$("#industryShow").parents(".coninfobox").removeClass("displayNone");
322
						$("#item1user>.nodatabox").addClass("displayNone");
323
						industryShow($info.industry);
324
					}
325
					//教育背景					
326
					if($info.edus.length) {
327
						eduBgShow($info.edus);
328
					} else {
329
						$("#eduBgShow").parents(".coninfobox").hide();
330
					}
331
					//兼职
332
					if($info.jobs.length) {
333
						timeJobShow($info.jobs);
334
					} else {
335
						$("#timeJobShow").parents(".coninfobox").hide();
336
					}
337
					//项目
338
					if($info.projects.length) {
339
						projectShow($info.projects)
340
					} else {
341
						$("#projectShow").parents(".coninfobox").hide();
342
					}
343
					//荣誉
344
					if($info.honors.length) {
345
						honorShow($info.honors);
346
					} else {
347
						$("#honorShow").parents(".coninfobox").hide();
348
					}
349
					
350
					if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
351
						$("#item6user>.nodatabox").show();
352
						$("#item6user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
353
					}
354
					
355
					var weibotitle = $info.name;
356
					var weibourl = window.location.href;
357
					var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
358
					$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
359
				
360
				}
361
			},
362
			error: function() {
363
				$.MsgBox.Alert('提示', '链接服务器超时')
364
			}
365
		});
366
	}
367
	function subjectShow(data) {
264 368
		if(data != undefined && data.length != 0) {
265 369
			var subs = new Array();
266 370
			if(data.indexOf(',')) {
@ -275,8 +379,9 @@ $(function() {
275 379
			}
276 380
		}
277 381
	}
278
	var oArray=[];
279
	var researchAreaShow = function($datas, $datarecords) {
382
	
383
	function researchAreaShow($datas, $datarecords) {
384
		var oArray=[];
280 385
		if($datas != undefined && $datas.length != 0) {
281 386
			var html = [];
282 387
			for(var i = 0; i < $datas.length; ++i) {
@ -325,7 +430,7 @@ $(function() {
325 430
			document.getElementById("researchAreaShow").innerHTML = html.join('');
326 431
		}
327 432
	}
328
	var industryShow = function(data) {
433
	function industryShow(data) {
329 434
		if(data != undefined && data.length != 0) {
330 435
			var subs = new Array();
331 436
			if(data.indexOf(',')) {
@ -340,7 +445,7 @@ $(function() {
340 445
			}
341 446
		}
342 447
	}
343
	var projectShow = function(data) {
448
	function projectShow(data) {
344 449
		if(data.length > 0) {
345 450
			for(var i = 0; i < data.length; i++) {
346 451
				if(!data[i].descp) {
@ -366,7 +471,7 @@ $(function() {
366 471
			}
367 472
		}
368 473
	}
369
	var honorShow = function(data) {
474
	function honorShow(data) {
370 475
		if(data.length > 0) {
371 476
			for(var i = 0; i < data.length; i++) {
372 477
				var timeho="";
@ -386,7 +491,7 @@ $(function() {
386 491
			}
387 492
		}
388 493
	}
389
	var timeJobShow = function(data) {
494
	function timeJobShow(data) {
390 495
		if(data.length > 0) {
391 496
			for(var i = 0; i < data.length; i++) {
392 497
				if(data[i].department) {
@ -412,7 +517,7 @@ $(function() {
412 517
			}
413 518
		}
414 519
	}
415
	var eduBgShow = function(data) {
520
	function eduBgShow(data) {
416 521
		if(data.length > 0) {
417 522
			for(var i = 0; i < data.length; i++) {
418 523
				var college="",major="",degree=""
@ -467,111 +572,7 @@ $(function() {
467 572
		}
468 573
		return ret;
469 574
	}
470
	//用户详细信息
471
	function getUserInfo(professorId){
472
		$.ajax({
473
			type:"get",
474
			url:"/ajax/professor/info/"+ professorId,
475
			async:true,
476
			success: function(data) {
477
				var $info = data.data;
478
				if(data.success) {
479
					if($info.hasHeadImage){
480
						$("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
481
					}
482
					$("#proName").text($info.name);
483
					var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
484
					$("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
485
					if($info.address){
486
						$("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
487
					}
488
					var proOther="";
489
					if($info.orgName){
490
						if($info.department){
491
							if($info.office){
492
								proOther = $info.orgName + "," + $info.department + "," + $info.office
493
							}else{
494
								proOther = $info.orgName + "," + $info.department
495
							}
496
						}else{
497
							proOther = $info.orgName
498
						}
499
					}
500
					$("#proOther").text(proOther);
501
					var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
502
					if($info.title){
503
						$("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
504
						llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
505
					}
506
					document.title = llqtitle;
507
					
508
509
					//个人简介
510
					if($info.descp) {
511
						$("#descpS").parents(".coninfobox").removeClass("displayNone");
512
						$("#item1user>.nodatabox").addClass("displayNone");
513
						$("#descpS").text($info.descp);
514
					}
515
					//学术领域					
516
					if($info.subject) {
517
						$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
518
						$("#item1user>.nodatabox").addClass("displayNone");
519
						subjectShow($info.subject);
520
					}
521
					//研究方向
522
					if($info.researchAreas.length) {
523
						$("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
524
						$("#item1user>.nodatabox").addClass("displayNone");
525
						researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
526
					}
527
					//行业领域	
528
					if($info.industry) {
529
						$("#industryShow").parents(".coninfobox").removeClass("displayNone");
530
						$("#item1user>.nodatabox").addClass("displayNone");
531
						industryShow($info.industry);
532
					}
533
					//教育背景					
534
					if($info.edus.length) {
535
						eduBgShow($info.edus);
536
					} else {
537
						$("#eduBgShow").parents(".coninfobox").hide();
538
					}
539
					//兼职
540
					if($info.jobs.length) {
541
						timeJobShow($info.jobs);
542
					} else {
543
						$("#timeJobShow").parents(".coninfobox").hide();
544
					}
545
					//项目
546
					if($info.projects.length) {
547
						projectShow($info.projects)
548
					} else {
549
						$("#projectShow").parents(".coninfobox").hide();
550
					}
551
					//荣誉
552
					if($info.honors.length) {
553
						honorShow($info.honors);
554
					} else {
555
						$("#honorShow").parents(".coninfobox").hide();
556
					}
557
					
558
					if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
559
						$("#item6user>.nodatabox").show();
560
						$("#item6user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
561
					}
562
					
563
					var weibotitle = $info.name;
564
					var weibourl = window.location.href;
565
					var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
566
					$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
567
				
568
				}
569
			},
570
			error: function() {
571
				$.MsgBox.Alert('提示', '链接服务器超时')
572
			}
573
		});
574
	}
575
	
575 576
	//合作历史及评价
576 577
	function historyEvaluate(){
577 578
		$.ajax({