tray/src/messenger/webim/js/users.js

1 line
6.8 KiB
JavaScript
Raw Normal View History

sq.hi=mn.nn();mn.sn(sq.hi,sq.lq,{qn:function(pq){this.oq(pq);this.pq.onComplete=this.et.on(this);this.pq.jr=this.ft.on(this);this.pq.hr=this._q.on(this);this.pq.timeout=(3363+1637);this.frequency=(this.pq.frequency||2);this.gt={} ;this.$t();} ,ft:function(_t,mu){if(this.pq.lu)this.pq.lu("offline, reconnecting");this.qu();this.ru=setTimeout(this.$t.on(this),01750);} ,_q:function(_t){if(this.pq.lu)this.pq.lu("timeout, reconnecting");this.qu();this.ru=setTimeout(this.$t.on(this),(818+182));} ,qu:function(){if(this.gt.pq)this.gt.pq.onComplete=undefined;clearTimeout(this.ru);} ,$t:function(){if(this.pq.ii)this.pq.fq=(this.pq.ii)();this.gt=new sq.vq(this.pq.url,this.pq);} ,et:function(eu){try{var ju=sq.uq(eu);if(ju){(this.pq.ku||sq.kq)(ju);} else{if(this.pq.lu)this.pq.lu("reconnecting");} } catch(e){} this.ru=setTimeout(this.$t.on(this),this.frequency*(616+384));} } );var ji={ki:function(link,title,li,oi,width,height,pi){return'<a href="'+link+'"'+(pi!=null?' class="'+pi+'"':'')+' target="_blank" title="'+title+'" onclick="this.newWindow = window.open(\''+link+'\', \''+li+'\', \'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width='+width+',height='+height+',resizable=1\');this.newWindow.focus();this.newWindow.opener=window;return false;">'+oi+'</a>';} ,di:function(content){return'<table class="inner"><tr>'+content+'</tr></table>';} ,ei:function(fi,gi,id,ai,bi,ci,xt,vi){var wi=2;var link=gi+"?thread="+id;var xi='<td>';if(bi||ai){xi+=ji.ki((vi||!ai)?link:link+"&viewonly=true",localized[bi?0:1],"ImCenter"+id,fi,(475+165),0740,null);} else{xi+='<a href="#">'+fi+'</a>';} xi+='</td>';if(bi){xi+='<td class="icon">';xi+=ji.ki(link,localized[0],"ImCenter"+id,'<img src="'+ht+'/images/tbliclspeak.gif" width="15" height="15" border="0" alt="'+localized[0]+'">',(471+169),0x1e0,null);xi+='</td>';wi++;} if(ai){xi+='<td class="icon">';xi+=ji.ki(link+"&viewonly=true",localized[1],"ImCenter"+id,'<img src="'+ht+'/images/tbliclread.gif" width="15" height="15" border="0" alt="'+localized[1]+'">',(520+120),(382+98),null);xi+='</td>';wi++;} if(xt!=""){xi+='</tr><tr><td class="firstmessage" colspan="'+wi+'"><a href="javascript:void(0)" title="'+xt+'" onclick="alert(this.title);return false;">';xi+=xt.length>0x1e?xt.substring(0,(28+2))+'...':xt;xi+='</a></td>';} return ji.di(xi);} ,yi:function(id,zi){return'<td class="icon">'+ji.ki(ht+'/operator/ban.php?'+(zi?'id='+zi:'thread='+id),localized[2],"ban"+id,'<img src="'+ht+'/images/ban.gif" width="15" height="15" border="0" alt="'+localized[2]+'">',(534+186),0x1e0,null)+'</td>';} } ;sq.$i=mn.nn();mn.sn(sq.$i,sq.lq,{qn:function(pq){this.oq(pq);this.pq.ii=this.ii.on(this);this.pq.lu=this.lu.on(this);this.pq.ku=this.ku.on(this);this.pq._i=0;this.mj=new Object();this.nj=0;this.t=this.pq.qj;this.rj=new sq.hi(this.pq);} ,ii:function(){return"company="+this.pq.company+"&since="+this.pq._i;} ,nu:function(pu){this.pq.status.innerHTML=pu;} ,lu:function(s){this.nu(s);} ,sj:function(uh){var id,tj,uj,ai=false,bi=false,hj=false,ci=null,zi=null;for(var i=0;i<uh.attributes.length;i++){var ij=uh.attributes[i];if(ij.nodeName=="id")id=ij.nodeValue;else if(ij.nodeName=="stateid")tj=ij.nodeValue;else if(ij.nodeName=="state")uj=ij.nodeValue;else if(ij.nodeName=="canopen")bi=true;else if(ij.nodeName=="canview")ai=true;else if(ij.nodeName=="canban")hj=true;else if(ij.nodeName=="ban")ci=ij.nodeValue;else if(ij.nodeName=="banid")zi=ij.nodeValue;} function jj(ds,kj,id,lj){var ws=ls.fs(id,kj,ds);if(ws)ws.innerHTML=lj;} var kj=ls.os("thr"+id,this.t);if(tj=="closed"){if(kj){this.t.deleteRow(kj.rowIndex);} this.mj[id]=null;return;} var oj=qs.rs(uh,"name");var pj=qs.rs(uh,"addr");var dj=qs.rs(uh,"time");var ej=qs.rs(uh,"agent");var fj=qs.rs(uh,"modified");var xt=qs.rs(uh,"message");var gj='<td>'+qs.rs(uh,"useragent")+'</td>';if(ci!=null){gj='<td>'+qs.rs(uh,"reason")+'</td>';} if(hj){gj+=ji.yi(id,zi);} gj=ji.di(gj);var aj=ls.os("t"+tj,this.t);var bj=ls.os("t"+tj+"end",this.t);if(kj!=null&&(kj.rowIndex<=aj.rowIndex||kj.rowIndex>=bj.rowIndex)){this.t.deleteRow(kj.rowIndex);this.mj[id]=null;kj=null;} if(kj==null){kj=this.t.insertRow