function Tsites_advance_search(){var _this=this;_this.collegeid=0;_this.disciplineid="";_this.facultyid=0;_this.enrolldisciplineid=0;_this.rankcode="";_this.teachertype="";_this.teacherstate="";_this.honorid=0;_this.pinyin="";_this.teacherName="";_this.searchDirection="";_this.callbackFun="";_this.decorateCallbackFun="";_this.endBackFun="";_this.lineId="";_this.viewMode=8;_this.viewid=0;_this.siteOwner=0;_this.viewOwner="";_this.viewUniqueId=0;_this.pageNumber=10;_this.imageWidth=100;_this.imageHeight=100;_this.currentPage=1;_this.loading=false;_this.totalNum=0;_this.contentJSONData;_this.totalpage=0;_this.uid="";_this.imageScale=null;_this.showlang="";_this.profilelen=100;_this.ellipsis="";_this.alignright=false;_this.pageBarCustomPageId="";_this.pageBarPageNumberId="";_this.pageBarTotalNumberId="";_this.pageBarCurPageId="";_this.pageBarTotalPageId="";_this.pageBarFirstPageId="";_this.pageBarPrePageId="";_this.pageBarNextPageId="";_this.pageBarLastPageId="";_this.pageBarGotoPageId="";_this.initParam=function(p){_this.pageBarCustomPageId=p.pageBarCustomPageId?p.pageBarCustomPageId:"";_this.pageBarPageNumberId=p.pageBarPageNumberId?p.pageBarPageNumberId:"";_this.pageBarTotalNumberId=p.pageBarTotalNumberId?p.pageBarTotalNumberId:"";_this.pageBarCurPageId=p.pageBarCurPageId?p.pageBarCurPageId:"";_this.pageBarTotalPageId=p.pageBarTotalPageId?p.pageBarTotalPageId:"";_this.pageBarFirstPageId=p.pageBarFirstPageId?p.pageBarFirstPageId:"";_this.pageBarPrePageId=p.pageBarPrePageId?p.pageBarPrePageId:"";_this.pageBarNextPageId=p.pageBarNextPageId?p.pageBarNextPageId:"";_this.pageBarLastPageId=p.pageBarLastPageId?p.pageBarLastPageId:"";_this.pageBarGotoPageId=p.pageBarGotoPageId?p.pageBarGotoPageId:"";_this.rankcode=p.rankcode?p.rankcode:"";_this.teachertype=p.teachertype?p.teachertype:0;_this.teacherstate=p.teacherstate?p.teacherstate:"";console.log(_this.teacherstate);_this.facultyid=p.facultyid?p.facultyid:"";_this.pinyin=p.pinyin?p.pinyin:"";_this.actiontype=p.actiontype?p.actiontype:"";_this.collegeid=p.collegeid?p.collegeid:0;_this.disciplineid=p.disciplineid?p.disciplineid:0;_this.honorid=p.honorid?p.honorid:0;_this.callbackFun=p.callbackFun?p.callbackFun:"";_this.decorateCallbackFun=p.decorateCallbackFun?p.decorateCallbackFun:"";_this.endBackFun=p.endBackFun?p.endBackFun:"";_this.lineId=p.lineId?p.lineId:"";_this.type=p.type?p.type:"";_this.viewMode=p.viewMode?p.viewMode:8;_this.viewid=p.viewId?p.viewId:0;_this.viewOwner=p.viewOwner?p.viewOwner:"";_this.siteOwner=p.siteOwner?p.siteOwner:0;_this.viewUniqueId=p.viewUniqueId?p.viewUniqueId:0;_this.profilelen=p.profilelen?p.profilelen:100;_this.ellipsis=p.ellipsis?p.ellipsis:"";_this.alignright=p.alignright?p.alignright:false;_this.uid="u_"+_this.viewUniqueId+"_";_this.pageNumber=p.pageNumber?p.pageNumber:10;_this.imageWidth=p.imageWidth?p.imageWidth:100;_this.imageHeight=p.imageHeight?p.imageHeight:100;_this.showlang=p.showlang?p.showlang:"";_this.imageScale=new ImageScale(_this.uid,_this.imageWidth,_this.imageHeight,true,true);_this.setContainer()};_this.template=null;_this.containerobj=null;_this.setContainer=function(){_this.oldtemplatehtml=jQuery("#"+_this.lineId);if(_this.oldtemplatehtml&&_this.oldtemplatehtml[0]){_this.templatehtml=jQuery(_this.oldtemplatehtml).clone(true);_this.containerobj=_this.oldtemplatehtml.parent();_this.containerobj.empty();_this.templatehtml.css("display","");_this.template=jQuery.templates(_this.templatehtml[0].outerHTML)}return null};_this.loadData=function(){_this.clearContainer();jQuery.when(_this.queryData()).then(function(){if(_this.contentJSONData){_this.totalNum=_this.contentJSONData.totalnum;_this.totalpage=_this.contentJSONData.totalpage;var teacherData=_this.contentJSONData.teacherData;if(teacherData.length==0){_this.currentPage=0}for(var i=0;i_this.totalpage?_this.totalpage:_this.currentPage+1}if(methodAction=="first"){_this.currentPage=1}if(methodAction=="last"){_this.currentPage=_this.totalpage}if(methodAction=="custom"){if(jQuery("#"+_this.pageBarCustomPageId)){var topage=jQuery("#"+_this.pageBarCustomPageId).val();topage=parseInt(topage);if(topage<=0){_this.currentPage=1}else{if(topage>_this.totalpage){_this.currentPage=_this.totalpage}else{if(isNaN(topage)){_this.currentPage=1}else{_this.currentPage=topage}}}}}_this.loadData();_this.changePageBar()}};_this.changePageBar=function(){if(jQuery("#"+_this.pageBarCustomPageId)){jQuery("#"+_this.pageBarCustomPageId).val("")}if(jQuery("#"+_this.pageBarPageNumberId)){jQuery("#"+_this.pageBarPageNumberId).html(_this.pageNumber)}if(jQuery("#"+_this.pageBarTotalNumberId)){jQuery("#"+_this.pageBarTotalNumberId).html(_this.totalNum)}if(jQuery("#"+_this.pageBarCurPageId)){jQuery("#"+_this.pageBarCurPageId).html(_this.currentPage)}if(jQuery("#"+_this.pageBarTotalPageId)){jQuery("#"+_this.pageBarTotalPageId).html(_this.totalpage)}if(jQuery("#"+_this.pageBarFirstPageId)){jQuery("#"+_this.pageBarFirstPageId).unbind("click");jQuery("#"+_this.pageBarFirstPageId).bind("click",{methodAction:"first"},_this.gotoPageBindFunction)}if(jQuery("#"+_this.pageBarPrePageId)){jQuery("#"+_this.pageBarPrePageId).unbind("click");if(_this.currentPage>1){jQuery("#"+_this.pageBarPrePageId).bind("click",{methodAction:"pre"},_this.gotoPageBindFunction)}}if(jQuery("#"+_this.pageBarNextPageId)){jQuery("#"+_this.pageBarNextPageId).unbind("click");if(_this.currentPage<_this.totalpage){jQuery("#"+_this.pageBarNextPageId).bind("click",{methodAction:"next"},_this.gotoPageBindFunction)}}if(jQuery("#"+_this.pageBarLastPageId)){jQuery("#"+_this.pageBarLastPageId).unbind("click");if(_this.currentPage!=_this.totalpage){jQuery("#"+_this.pageBarLastPageId).bind("click",{methodAction:"last"},_this.gotoPageBindFunction)}}if(jQuery("#"+_this.pageBarGotoPageId)){jQuery("#"+_this.pageBarGotoPageId).unbind("click");jQuery("#"+_this.pageBarGotoPageId).bind("click",{methodAction:"custom"},_this.gotoPageBindFunction)}};_this.clearContainer=function(){_this.containerobj.empty()}};