From 4516fabf62fe214f6300b6b4b404bbdc4a0b4dfb Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Wed, 30 Mar 2011 00:01:04 +0200 Subject: [PATCH] fix theme preview; fix bottom anchor in chat.js --- src/messenger/webim/js/164/chat.js | 2 +- src/messenger/webim/js/164/users.js | 2 +- src/messenger/webim/js/source/chat.js | 2 +- src/messenger/webim/operator/themes.php | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/messenger/webim/js/164/chat.js b/src/messenger/webim/js/164/chat.js index 048f509c..3cd0efaa 100644 --- a/src/messenger/webim/js/164/chat.js +++ b/src/messenger/webim/js/164/chat.js @@ -1 +1 @@ -var _s={mt:function(nt){if(nt.contentDocument){return nt.contentDocument;} else if(nt.contentWindow){return nt.contentWindow.document;} else if(nt.document){return nt.document;} else{return null;} } ,qt:function(nt){var rt=this.mt(nt);rt.open();rt.write("");rt.write("");rt.write("");rt.write("
");rt.write("");rt.close();nt.onload=function(){if(nt.tt){_s.mt(nt).getElementById('content').innerHTML+=nt.tt;_s.ut(nt);} } ;} ,ht:function(nt,it){var jt=this.mt(nt).getElementById('content');if(jt==null){if(!nt.tt)nt.tt="";nt.tt+=it;} else{jt.innerHTML+=it;} } ,ut:function(nt){var kt=this.mt(nt).getElementById('bottom');if(myAgent=='opera'){try{nt.contentWindow.scrollTo(0,this.mt(nt).getElementById('content').clientHeight);} catch(e){} } if(kt){kt.scrollIntoView(false);} } } ;nq.lt=mn.nn();mn.rn(nq.lt,nq.iq,{qn:function(kq){this.jq(kq);this.kq.onComplete=this.ot.ln(this);this.kq.ur=this.pt.ln(this);this.kq.sr=this.yq.ln(this);this.kq.timeout=011610;this.dt={} ;this.frequency=(this.kq.frequency||2);this.et=0;this.ft=true;this.gt=true;this.at=true;this.bt=this.kq.ct!=null;_s.qt(this.kq.vt);if(this.kq.ct){this.kq.ct.onkeydown=this.wt.ln(this);this.kq.ct.onfocus=(function(){this.at=true;} ).ln(this);this.kq.ct.onblur=(function(){this.at=false;} ).ln(this)} this.xt();} ,pt:function(yt,zt){this.$t("offline, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),01750);} ,yq:function(yt){this.$t("timeout, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),01750);} ,nu:function(qu){this.kq.pq='act='+qu+'&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&lastid='+(this.kq.ru||0);if(this.kq.user)this.kq.pq+="&user=true";if(qu=='refresh'&&this.kq.ct&&this.kq.ct.value!='')this.kq.pq+="&typed=1";} ,su:function(tu){if(this.kq.ct)this.kq.ct.disabled=!tu;} ,_t:function(){this.su(true);if(this.dt.kq)this.dt.kq.onComplete=undefined;clearTimeout(this.mu);} ,xt:function(){this.nu("refresh");this.dt=new nq.aq(this.kq.servl,this.kq);} ,ot:function(sq){try{this.su(true);this.ft=true;var uu=nq.rq(sq);if(uu&&uu.tagName=='thread'){this.hu(uu);} else{this.iu(sq,uu,'refresh messages failed');} } catch(e){} this.gt=false;this.mu=setTimeout(this.xt.ln(this),this.frequency*01750);} ,ju:function(ku){if(ku==""||!this.ft){return;} this.ft=false;this._t();this.gt=true;this.nu("post");var lu={} .tn(this.kq);lu.pq+="&message="+encodeURIComponent(ku);lu.onComplete=(function(ou){this.ot(ou);if(this.kq.ct){this.kq.ct.value='';this.kq.ct.focus();} } ).ln(this);if(myRealAgent!='opera')this.su(false);this.dt=new nq.aq(this.kq.servl,lu);} ,pu:function(du){this.gt=true;new nq.aq(this.kq.servl,{pq:'act=rename&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&name='+encodeURIComponent(du)} );} ,eu:function(sq){var uu=nq.rq(sq);if(uu&&uu.tagName=='closed'){setTimeout('window.close()',(1889+111));} else{this.iu(sq,uu,'cannot close');} } ,fu:function(){var gu='act=close&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0);if(this.kq.user)gu+="&user=true";new nq.aq(this.kq.servl,{pq:gu,onComplete:this.eu.ln(this)} );} ,au:function(bu,ct){var cu=ms.ss(ct);_s.ht(bu,cu);} ,vu:function(wu){if($("typingdiv")){$("typingdiv").style.display=wu?'inline':'none';} } ,xu:function(yu){var zu=ms.ss(yu);if(this.kq.yu&&this.kq.user){this.kq.yu.innerHTML=zu!=""?"\"\"\"\"/":"";} } ,hu:function(uu){var _u=false;var mh=this.kq.vt;var nh=ms.is(uu,"lastid");if(nh){this.kq.ru=nh;} var qh=ms.is(uu,"typing");if(qh){this.vu(qh=='1');} var rh=ms.is(uu,"canpost");if(rh){if(rh=='1'&&!this.bt||this.bt&&rh!='1'){window.location.href=window.location.href;} } for(var i=0;i=0){var tu="updated";if(this.et>0){var th=((new Date()).getTime()-this.et)/(713+287);tu=tu+", "+th+" secs";if(th>(7+3)){alert(tu);} } this.et=(new Date()).getTime();this.$t(tu);} else{this.uh();} if(_u){_s.ut(this.kq.vt);if(!this.gt){var hh=$('soundimg');if(hh==null||hh.className.match(new RegExp("\\bisound\\b"))){vs(st.$u+'/sounds/new_message.wav');} } if(!this.at){window.focus();} } } ,ih:function(jh,kh){return((kh==015&&(jh||this.kq.ignorectrl))||(kh==012));} ,wt:function(k){if(k){lh=k.ctrlKey;k=k.which;} else{k=event.keyCode;lh=event.ctrlKey;} if(this.kq.ct&&this.ih(lh,k)){var oh=this.kq.ct.value;if(this.kq.ignorectrl){oh=oh.replace(/[\r\n]+$/,'');} this.ju(oh);return false;} return true;} ,iu:function(sq,uu,ph){if(uu&&uu.tagName=='error'){this.$t(ms.ns(uu,"descr"));} else{this.$t("reconnecting");} } ,dh:function(k){if($("engineinfo")){$("engineinfo").style.display='inline';$("engineinfo").innerHTML=k;} } ,$t:function(k){if(this.eh)clearTimeout(this.eh);this.dh(k);this.eh=setTimeout(this.uh.ln(this),(2554+1446));} ,uh:function(){$("engineinfo").style.display='none';} } );var st={fh:{} ,gh:function(){st.fh.pu($('uname').value);$('changename1').style.display='none';$('changename2').style.display='inline';$('unamelink').innerHTML=zs($('uname').value);} ,ah:function(){$('changename1').style.display='inline';$('changename2').style.display='none';} } ;pr.ir({'#postmessage a':function(bh){bh.onclick=function(){var ct=$('msgwnd');if(ct)st.fh.ju(ct.value);} ;} ,'select#predefined':function(bh){bh.onchange=function(){var ct=$('msgwnd');if(this.selectedIndex!=0){ct.value=this.options[this.selectedIndex].innerText||this.options[this.selectedIndex].innerHTML;} this.selectedIndex=0;ct.focus();} ;} ,'div#changename2 a':function(bh){bh.onclick=function(){st.ah();return false;} ;} ,'div#changename1 a':function(bh){bh.onclick=function(){st.gh();return false;} ;} ,'div#changename1 input#uname':function(bh){bh.onkeydown=function(e){var kr=e||event;if(kr.keyCode==(9+4)){st.gh();} } ;} ,'a#refresh':function(bh){bh.onclick=function(){st.fh._t();st.fh.xt();} ;} ,'a#togglesound':function(bh){bh.onclick=function(){var hh=$('soundimg');if(!hh){return;} if(hh.className.match(new RegExp("\\bisound\\b"))){hh.className="tplimage inosound";} else{hh.className="tplimage isound";} var ch=$('msgwnd');if(ch)ch.focus();} ;} ,'a.closethread':function(bh){bh.onclick=function(){st.fh.fu();} ;} } );hr.ir(window,'onload',function(){st.$u=threadParams.wroot;st.cssfile=threadParams.cssfile;st.fh=new nq.lt(({ignorectrl:-1,vt:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),yu:$("avatarwnd"),ct:$("msgwnd")} ).tn(threadParams||{} ));} ); \ No newline at end of file +var _s={mt:function(nt){if(nt.contentDocument){return nt.contentDocument;} else if(nt.contentWindow){return nt.contentWindow.document;} else if(nt.document){return nt.document;} else{return null;} } ,qt:function(nt){var rt=this.mt(nt);rt.open();rt.write("");rt.write("");rt.write("");rt.write("
");rt.write("");rt.close();nt.onload=function(){if(nt.tt){_s.mt(nt).getElementById('content').innerHTML+=nt.tt;_s.ut(nt);} } ;} ,ht:function(nt,it){var jt=this.mt(nt).getElementById('content');if(jt==null){if(!nt.tt)nt.tt="";nt.tt+=it;} else{jt.innerHTML+=it;} } ,ut:function(nt){var kt=this.mt(nt).getElementById('bottom');if(myAgent=='opera'){try{nt.contentWindow.scrollTo(0,this.mt(nt).getElementById('content').clientHeight);} catch(e){} } if(kt){kt.scrollIntoView(false);} } } ;nq.lt=mn.nn();mn.rn(nq.lt,nq.iq,{qn:function(kq){this.jq(kq);this.kq.onComplete=this.ot.ln(this);this.kq.ur=this.pt.ln(this);this.kq.sr=this.yq.ln(this);this.kq.timeout=011610;this.dt={} ;this.frequency=(this.kq.frequency||2);this.et=0;this.ft=true;this.gt=true;this.at=true;this.bt=this.kq.ct!=null;_s.qt(this.kq.vt);if(this.kq.ct){this.kq.ct.onkeydown=this.wt.ln(this);this.kq.ct.onfocus=(function(){this.at=true;} ).ln(this);this.kq.ct.onblur=(function(){this.at=false;} ).ln(this)} this.xt();} ,pt:function(yt,zt){this.$t("offline, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),01750);} ,yq:function(yt){this.$t("timeout, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),01750);} ,nu:function(qu){this.kq.pq='act='+qu+'&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&lastid='+(this.kq.ru||0);if(this.kq.user)this.kq.pq+="&user=true";if(qu=='refresh'&&this.kq.ct&&this.kq.ct.value!='')this.kq.pq+="&typed=1";} ,su:function(tu){if(this.kq.ct)this.kq.ct.disabled=!tu;} ,_t:function(){this.su(true);if(this.dt.kq)this.dt.kq.onComplete=undefined;clearTimeout(this.mu);} ,xt:function(){this.nu("refresh");this.dt=new nq.aq(this.kq.servl,this.kq);} ,ot:function(sq){try{this.su(true);this.ft=true;var uu=nq.rq(sq);if(uu&&uu.tagName=='thread'){this.hu(uu);} else{this.iu(sq,uu,'refresh messages failed');} } catch(e){} this.gt=false;this.mu=setTimeout(this.xt.ln(this),this.frequency*01750);} ,ju:function(ku){if(ku==""||!this.ft){return;} this.ft=false;this._t();this.gt=true;this.nu("post");var lu={} .tn(this.kq);lu.pq+="&message="+encodeURIComponent(ku);lu.onComplete=(function(ou){this.ot(ou);if(this.kq.ct){this.kq.ct.value='';this.kq.ct.focus();} } ).ln(this);if(myRealAgent!='opera')this.su(false);this.dt=new nq.aq(this.kq.servl,lu);} ,pu:function(du){this.gt=true;new nq.aq(this.kq.servl,{pq:'act=rename&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&name='+encodeURIComponent(du)} );} ,eu:function(sq){var uu=nq.rq(sq);if(uu&&uu.tagName=='closed'){setTimeout('window.close()',(1544+456));} else{this.iu(sq,uu,'cannot close');} } ,fu:function(){var gu='act=close&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0);if(this.kq.user)gu+="&user=true";new nq.aq(this.kq.servl,{pq:gu,onComplete:this.eu.ln(this)} );} ,au:function(bu,ct){var cu=ms.ss(ct);_s.ht(bu,cu);} ,vu:function(wu){if($("typingdiv")){$("typingdiv").style.display=wu?'inline':'none';} } ,xu:function(yu){var zu=ms.ss(yu);if(this.kq.yu&&this.kq.user){this.kq.yu.innerHTML=zu!=""?"\"\"\"\"/":"";} } ,hu:function(uu){var _u=false;var mh=this.kq.vt;var nh=ms.is(uu,"lastid");if(nh){this.kq.ru=nh;} var qh=ms.is(uu,"typing");if(qh){this.vu(qh=='1');} var rh=ms.is(uu,"canpost");if(rh){if(rh=='1'&&!this.bt||this.bt&&rh!='1'){window.location.href=window.location.href;} } for(var i=0;i=0){var tu="updated";if(this.et>0){var th=((new Date()).getTime()-this.et)/0x3e8;tu=tu+", "+th+" secs";if(th>012){alert(tu);} } this.et=(new Date()).getTime();this.$t(tu);} else{this.uh();} if(_u){_s.ut(this.kq.vt);if(!this.gt){var hh=$('soundimg');if(hh==null||hh.className.match(new RegExp("\\bisound\\b"))){vs(st.$u+'/sounds/new_message.wav');} } if(!this.at){window.focus();} } } ,ih:function(jh,kh){return((kh==015&&(jh||this.kq.ignorectrl))||(kh==(7+3)));} ,wt:function(k){if(k){lh=k.ctrlKey;k=k.which;} else{k=event.keyCode;lh=event.ctrlKey;} if(this.kq.ct&&this.ih(lh,k)){var oh=this.kq.ct.value;if(this.kq.ignorectrl){oh=oh.replace(/[\r\n]+$/,'');} this.ju(oh);return false;} return true;} ,iu:function(sq,uu,ph){if(uu&&uu.tagName=='error'){this.$t(ms.ns(uu,"descr"));} else{this.$t("reconnecting");} } ,dh:function(k){if($("engineinfo")){$("engineinfo").style.display='inline';$("engineinfo").innerHTML=k;} } ,$t:function(k){if(this.eh)clearTimeout(this.eh);this.dh(k);this.eh=setTimeout(this.uh.ln(this),0xfa0);} ,uh:function(){$("engineinfo").style.display='none';} } );var st={fh:{} ,gh:function(){st.fh.pu($('uname').value);$('changename1').style.display='none';$('changename2').style.display='inline';$('unamelink').innerHTML=zs($('uname').value);} ,ah:function(){$('changename1').style.display='inline';$('changename2').style.display='none';} } ;pr.ir({'#postmessage a':function(bh){bh.onclick=function(){var ct=$('msgwnd');if(ct)st.fh.ju(ct.value);} ;} ,'select#predefined':function(bh){bh.onchange=function(){var ct=$('msgwnd');if(this.selectedIndex!=0){ct.value=this.options[this.selectedIndex].innerText||this.options[this.selectedIndex].innerHTML;} this.selectedIndex=0;ct.focus();} ;} ,'div#changename2 a':function(bh){bh.onclick=function(){st.ah();return false;} ;} ,'div#changename1 a':function(bh){bh.onclick=function(){st.gh();return false;} ;} ,'div#changename1 input#uname':function(bh){bh.onkeydown=function(e){var kr=e||event;if(kr.keyCode==015){st.gh();} } ;} ,'a#refresh':function(bh){bh.onclick=function(){st.fh._t();st.fh.xt();} ;} ,'a#togglesound':function(bh){bh.onclick=function(){var hh=$('soundimg');if(!hh){return;} if(hh.className.match(new RegExp("\\bisound\\b"))){hh.className="tplimage inosound";} else{hh.className="tplimage isound";} var ch=$('msgwnd');if(ch)ch.focus();} ;} ,'a.closethread':function(bh){bh.onclick=function(){st.fh.fu();} ;} } );hr.ir(window,'onload',function(){st.$u=threadParams.wroot;st.cssfile=threadParams.cssfile;st.fh=new nq.lt(({ignorectrl:-1,vt:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),yu:$("avatarwnd"),ct:$("msgwnd")} ).tn(threadParams||{} ));} ); \ No newline at end of file diff --git a/src/messenger/webim/js/164/users.js b/src/messenger/webim/js/164/users.js index c44f90bb..f0767052 100644 --- a/src/messenger/webim/js/164/users.js +++ b/src/messenger/webim/js/164/users.js @@ -1 +1 @@ -nq.vh=mn.nn();mn.rn(nq.vh,nq.iq,{qn:function(kq){this.jq(kq);this.kq.onComplete=this.ot.ln(this);this.kq.ur=this.pt.ln(this);this.kq.sr=this.yq.ln(this);this.kq.timeout=(3698+1302);this.frequency=(this.kq.frequency||2);this.dt={} ;this.xt();} ,pt:function(yt,zt){if(this.kq.iu)this.kq.iu("offline, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),(771+229));} ,yq:function(yt){if(this.kq.iu)this.kq.iu("timeout, reconnecting");this._t();this.mu=setTimeout(this.xt.ln(this),01750);} ,_t:function(){if(this.dt.kq)this.dt.kq.onComplete=undefined;clearTimeout(this.mu);} ,xt:function(){if(this.kq.wh)this.kq.pq=(this.kq.wh)();this.dt=new nq.aq(this.kq.url,this.kq);} ,ot:function(ou){try{var uu=nq.rq(ou);if(uu){(this.kq.hu||nq.hq)(uu);} else{if(this.kq.iu)this.kq.iu("reconnecting");} } catch(e){} this.mu=setTimeout(this.xt.ln(this),this.frequency*01750);} } );var xh={yh:function(link,title,zh,$h,width,height,_h){return''+$h+'';} ,mi:function(content){return''+content+'
';} ,ni:function(qi,ri,id,si,ti,ui,ct,hi){var ii=2;var link=ri+"?thread="+id;var ji='';if(ti||si){ji+=xh.yh((hi||!si)?link:link+"&viewonly=true",localized[ti?0:1],"ImCenter"+id,qi,01200,(444+36),null);} else{ji+=''+qi+'';} ji+='';if(ti){ji+='';ji+=xh.yh(link,localized[0],"ImCenter"+id,''+localized[0]+'',(599+41),0x1e0,null);ji+='';ii++;} if(si){ji+='';ji+=xh.yh(link+"&viewonly=true",localized[1],"ImCenter"+id,''+localized[1]+'',0x280,(384+96),null);ji+='';ii++;} if(ct!=""){ji+='';ji+=ct.length>(18+12)?ct.substring(0,0x1e)+'...':ct;ji+='';} return xh.mi(ji);} ,ki:function(id,li){return''+xh.yh($u+'/operator/ban.php?'+(li?'id='+li:'thread='+id),localized[2],"ban"+id,''+localized[2]+'',01320,(471+9),null)+'';} } ;nq.oi=mn.nn();mn.rn(nq.oi,nq.iq,{qn:function(kq){this.jq(kq);this.kq.wh=this.wh.ln(this);this.kq.iu=this.iu.ln(this);this.kq.hu=this.hu.ln(this);this.kq.pi=0;this.di=new Object();this.ei=0;this.t=this.kq.fi;this.gi=new nq.vh(this.kq);} ,wh:function(){return"since="+this.kq.pi+"&status="+this.kq.istatus+(this.kq.showonline?"&showonline=1":"");} ,$t:function(ku){this.kq.status.innerHTML=ku;} ,iu:function(s){this.$t(s);} ,ai:function(sh){var id,bi,ci,si=false,ti=false,vi=false,ui=null,li=null;for(var i=0;i';if(ui!=null){rj=''+ms.ns(sh,"reason")+'';} if(vi){rj+=xh.ki(id,li);} rj=xh.mi(rj);var sj=js.ks("t"+bi,this.t);var tj=js.ks("t"+bi+"end",this.t);if(yi!=null&&(yi.rowIndex<=sj.rowIndex||yi.rowIndex>=tj.rowIndex)){this.t.deleteRow(yi.rowIndex);this.di[id]=null;yi=null;} if(yi==null){yi=this.t.insertRow(sj.rowIndex+1);yi.className=(ui=="blocked"&&bi!="chat")?"ban":"in"+bi;yi.id="thr"+id;this.di[id]=new Array(mj,qj,bi);js.insertCell(yi,"name","visitor",null,null,xh.ni($i,this.kq.agentservl,id,si,ti,ui,ct,bi!='chat'));js.insertCell(yi,"contid","visitor","center",null,_i);js.insertCell(yi,"state","visitor","center",null,ci);js.insertCell(yi,"op","visitor","center",null,nj);js.insertCell(yi,"time","visitor","center",null,this.uj(mj));js.insertCell(yi,"wait","visitor","center",null,(bi!='chat'?this.uj(qj):'-'));js.insertCell(yi,"etc","visitor","center",null,rj);if(bi=='wait'||bi=='prio')return true;} else{this.di[id]=new Array(mj,qj,bi);yi.className=(ui=="blocked"&&bi!="chat")?"ban":"in"+bi;xi(this.t,yi,"name",xh.ni($i,this.kq.agentservl,id,si,ti,ui,ct,bi!='chat'));xi(this.t,yi,"contid",_i);xi(this.t,yi,"state",ci);xi(this.t,yi,"op",nj);xi(this.t,yi,"time",this.uj(mj));xi(this.t,yi,"wait",(bi!='chat'?this.uj(qj):'-'));xi(this.t,yi,"etc",rj);} return false;} ,hj:function(){function ij(t,id){var sj=$(id);var tj=$(id+"end");if(sj==null||tj==null){return false;} return sj.rowIndex+1=(46+14)){var ej=Math.floor(pj/(45+15));pj=pj%074;if(pj<(9+1))pj="0"+pj;dj=ej+":";} return dj+pj+":"+oj;} ,fj:function(){for(var i in this.di){if(this.di[i]!=null){var value=this.di[i];var yi=js.ks("thr"+i,this.t);if(yi!=null){function xi(os,yi,id,zi){var cs=js.ds(id,yi,os);if(cs)cs.innerHTML=zi;} xi(this.t,yi,"time",this.uj(value[0]));xi(this.t,yi,"wait",(value[2]!='chat'?this.uj(value[1]):'-'));} } } } ,gj:function(aj){var bj=false;var cj=ms.is(aj,"time");var vj=ms.is(aj,"revision");if(cj)this.ei=(new Date()).getTime()-cj;if(vj)this.kq.pi=vj;for(var i=0;i '+name;} xj.innerHTML=yj.join(', ');} ,hu:function(aj){if(aj.tagName=='update'){for(var i=0;i'+$h+'';} ,mi:function(content){return''+content+'
';} ,ni:function(qi,ri,id,si,ti,ui,ct,hi){var ii=2;var link=ri+"?thread="+id;var ji='';if(ti||si){ji+=xh.yh((hi||!si)?link:link+"&viewonly=true",localized[ti?0:1],"ImCenter"+id,qi,0x280,0740,null);} else{ji+=''+qi+'';} ji+='';if(ti){ji+='';ji+=xh.yh(link,localized[0],"ImCenter"+id,''+localized[0]+'',(529+111),(327+153),null);ji+='';ii++;} if(si){ji+='';ji+=xh.yh(link+"&viewonly=true",localized[1],"ImCenter"+id,''+localized[1]+'',(490+150),0x1e0,null);ji+='';ii++;} if(ct!=""){ji+='';ji+=ct.length>(25+5)?ct.substring(0,(18+12))+'...':ct;ji+='';} return xh.mi(ji);} ,ki:function(id,li){return''+xh.yh($u+'/operator/ban.php?'+(li?'id='+li:'thread='+id),localized[2],"ban"+id,''+localized[2]+'',(474+246),(318+162),null)+'';} } ;nq.oi=mn.nn();mn.rn(nq.oi,nq.iq,{qn:function(kq){this.jq(kq);this.kq.wh=this.wh.ln(this);this.kq.iu=this.iu.ln(this);this.kq.hu=this.hu.ln(this);this.kq.pi=0;this.di=new Object();this.ei=0;this.t=this.kq.fi;this.gi=new nq.vh(this.kq);} ,wh:function(){return"since="+this.kq.pi+"&status="+this.kq.istatus+(this.kq.showonline?"&showonline=1":"");} ,$t:function(ku){this.kq.status.innerHTML=ku;} ,iu:function(s){this.$t(s);} ,ai:function(sh){var id,bi,ci,si=false,ti=false,vi=false,ui=null,li=null;for(var i=0;i';if(ui!=null){rj=''+ms.ns(sh,"reason")+'';} if(vi){rj+=xh.ki(id,li);} rj=xh.mi(rj);var sj=js.ks("t"+bi,this.t);var tj=js.ks("t"+bi+"end",this.t);if(yi!=null&&(yi.rowIndex<=sj.rowIndex||yi.rowIndex>=tj.rowIndex)){this.t.deleteRow(yi.rowIndex);this.di[id]=null;yi=null;} if(yi==null){yi=this.t.insertRow(sj.rowIndex+1);yi.className=(ui=="blocked"&&bi!="chat")?"ban":"in"+bi;yi.id="thr"+id;this.di[id]=new Array(mj,qj,bi);js.insertCell(yi,"name","visitor",null,null,xh.ni($i,this.kq.agentservl,id,si,ti,ui,ct,bi!='chat'));js.insertCell(yi,"contid","visitor","center",null,_i);js.insertCell(yi,"state","visitor","center",null,ci);js.insertCell(yi,"op","visitor","center",null,nj);js.insertCell(yi,"time","visitor","center",null,this.uj(mj));js.insertCell(yi,"wait","visitor","center",null,(bi!='chat'?this.uj(qj):'-'));js.insertCell(yi,"etc","visitor","center",null,rj);if(bi=='wait'||bi=='prio')return true;} else{this.di[id]=new Array(mj,qj,bi);yi.className=(ui=="blocked"&&bi!="chat")?"ban":"in"+bi;xi(this.t,yi,"name",xh.ni($i,this.kq.agentservl,id,si,ti,ui,ct,bi!='chat'));xi(this.t,yi,"contid",_i);xi(this.t,yi,"state",ci);xi(this.t,yi,"op",nj);xi(this.t,yi,"time",this.uj(mj));xi(this.t,yi,"wait",(bi!='chat'?this.uj(qj):'-'));xi(this.t,yi,"etc",rj);} return false;} ,hj:function(){function ij(t,id){var sj=$(id);var tj=$(id+"end");if(sj==null||tj==null){return false;} return sj.rowIndex+1=074){var ej=Math.floor(pj/0x3c);pj=pj%074;if(pj<012)pj="0"+pj;dj=ej+":";} return dj+pj+":"+oj;} ,fj:function(){for(var i in this.di){if(this.di[i]!=null){var value=this.di[i];var yi=js.ks("thr"+i,this.t);if(yi!=null){function xi(os,yi,id,zi){var cs=js.ds(id,yi,os);if(cs)cs.innerHTML=zi;} xi(this.t,yi,"time",this.uj(value[0]));xi(this.t,yi,"wait",(value[2]!='chat'?this.uj(value[1]):'-'));} } } } ,gj:function(aj){var bj=false;var cj=ms.is(aj,"time");var vj=ms.is(aj,"revision");if(cj)this.ei=(new Date()).getTime()-cj;if(vj)this.kq.pi=vj;for(var i=0;i '+name;} xj.innerHTML=yj.join(', ');} ,hu:function(aj){if(aj.tagName=='update'){for(var i=0;i"); doc.write(""); doc.write(""); - doc.write("
"); + doc.write("
"); doc.write(""); doc.close(); frm.onload = function() { diff --git a/src/messenger/webim/operator/themes.php b/src/messenger/webim/operator/themes.php index 6bb32627..d9169bee 100644 --- a/src/messenger/webim/operator/themes.php +++ b/src/messenger/webim/operator/themes.php @@ -79,6 +79,7 @@ if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $sho 'userName' => getstring("chat.default.username"), 'remote' => "1.2.3.4", 'agentId' => 1, + 'groupid' => 0, 'userid' => 'visitor1', 'locale' => $current_locale, 'ltoken' => $show == 'agentrochat' ? 124 : 123),