Browse Source

科研资源信息中,咨询未登录,提示,并连接登陆页

dell 8 years ago
parent
commit
4fae8fa119
2 changed files with 25 additions and 16 deletions
  1. 24 15
      src/main/webapp/js/information.brow.js
  2. 1 1
      src/main/webapp/js/search.js

+ 24 - 15
src/main/webapp/js/information.brow.js

199
			     }
199
			     }
200
			     return ret;
200
			     return ret;
201
			}
201
			}
202
	
203
203
			$("#researchAreaShow").on("click",".plus",function(){
204
			$("#researchAreaShow").on("click",".plus",function(){
204
				if(userid && userid != null && userid != "null"){
205
				if(userid && userid != null && userid != "null"){
205
					//点赞变化样式
206
					if($(this).data("isagree")>-1){
207
						$(this).stop(true,true).animate({backgroundPositionY:0},300);//变成未点赞样式
208
					}else{
209
						$(this).stop(true,true).animate({backgroundPositionY:-26},300);//变成点赞样式
210
					}
211
					
212
					$.ajax({
206
					$.ajax({
213
						"url" : $(this).data("isagree")>-1?"/ajax/researchArea/unAgree":"/ajax/researchArea/agree",
207
						"url" : $(this).data("isagree")>-1?"/ajax/researchArea/unAgree":"/ajax/researchArea/agree",
214
						"type" : "POST",
208
						"type" : "POST",
241
					/*location.href="login.html"*/
235
					/*location.href="login.html"*/
242
				}
236
				}
243
				
237
				
244
				
245
			})
238
			})
246
239
247
	    	$.get("/ajax/professor/info/" + professorId, function($data) {
240
	    	$.get("/ajax/professor/info/" + professorId, function($data) {
655
	
648
	
656
	//科研资源中的咨询
649
	//科研资源中的咨询
657
	function clickResourceConsult(){
650
	function clickResourceConsult(){
658
		var professorId = $(this).attr("professorId");
651
		if(userid){
659
		consultHandler();
652
			var professorId = $(this).attr("professorId");
653
			consultHandler();
654
			
655
			$("ul.menucon").children().eq(1).addClass("clicknow");
656
			var consultTitleVal = $(this).parent().parent().parent().find(".consultTitleVal").text();
657
			$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
658
		}else {
659
			$.MsgBox.Alert("message","请登录");
660
			var aele = document.createElement('a');
661
			$("#mb_btnbox").append(aele);
662
			$("#mb_btnbox a").css({
663
				'display':"block",
664
				'width':'100%',
665
				'height':'40px',
666
				'position':'relative',
667
				'bottom':'40px',
668
				'left':0
669
				});
670
			aele.setAttribute('href', '../login.html');
671
		}
660
		
672
		
661
		$("ul.menucon").children().eq(1).addClass("clicknow");
662
		var consultTitleVal = $(this).parent().parent().parent().find(".consultTitleVal").text();
663
		$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
664
		
673
		
665
	};
674
	};
666
	
675
	
827
			});
836
			});
828
	}
837
	}
829
838
830
839
	
831
	
840
	
832
})
841
})
833
842

+ 1 - 1
src/main/webapp/js/search.js

602
			var consultTitleVal = $(this).parent().prev().find("a").text();
602
			var consultTitleVal = $(this).parent().prev().find("a").text();
603
			console.log($(this).parent());
603
			console.log($(this).parent());
604
			console.log($(this).parent().prev());
604
			console.log($(this).parent().prev());
605
			alert(consultTitleVal);
605
			//alert(consultTitleVal);
606
			$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
606
			$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
607
			//点击的发送
607
			//点击的发送
608
			$("#sendConsultBtn").click(function(){
608
			$("#sendConsultBtn").click(function(){