diff --git a/src/messenger/js/users.js b/src/messenger/js/users.js index 87bb326a..9960a733 100644 --- a/src/messenger/js/users.js +++ b/src/messenger/js/users.js @@ -95,11 +95,11 @@ var HtmlGenerationUtils = { return '' + content + '
'; }, - viewOpenCell: function(username,servlet,id,canview,canopen,ban,message) { + viewOpenCell: function(username,servlet,id,canview,canopen,ban,message,cantakenow) { var cellsCount = 2; var link = servlet+"?thread="+id; var gen = ''; - gen += HtmlGenerationUtils.popupLink( link, localized[canopen ? 0 : 1], "ImCenter"+id, username, 600, 420, ban); + gen += HtmlGenerationUtils.popupLink( cantakenow ? link : link+"&viewonly=true", localized[canopen ? 0 : 1], "ImCenter"+id, username, 600, 420, ban); gen += ''; if( canopen ) { gen += ''; @@ -107,7 +107,12 @@ var HtmlGenerationUtils = { gen += ''; cellsCount++; } - + if( canview ) { + gen += ''; + gen += HtmlGenerationUtils.popupLink( link+"&viewonly=true", localized[1], "ImCenter"+id, ''+localized[1]+'', 600, 420, null); + gen += ''; + cellsCount++; + } return HtmlGenerationUtils.generateOneRowTable(gen); } }; @@ -152,6 +157,8 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { vstate = attr.nodeValue; else if( attr.nodeName == "canopen" ) canopen = true; + else if( attr.nodeName == "canview" ) + canview = true; } @@ -194,7 +201,7 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { HtmlGenerationUtils.insertHr(this.t, startRow.rowIndex+2); row.id = "thr"+id; this.threadTimers[id] = new Array(vtime,modified,stateid); - CommonUtils.insertCell(row, "name", "table", null, 30, HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message)); + CommonUtils.insertCell(row, "name", "table", null, 30, HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message,stateid!='chat')); HtmlGenerationUtils.insertSplitter(row); CommonUtils.insertCell(row, "contid", "table", "center", null, vaddr ); HtmlGenerationUtils.insertSplitter(row); @@ -212,7 +219,7 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { return true; } else { this.threadTimers[id] = new Array(vtime,modified,stateid); - setcell(this.t, row,"name",HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message)); + setcell(this.t, row,"name",HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message,stateid!='chat')); setcell(this.t, row,"contid",vaddr); setcell(this.t, row,"state",vstate); setcell(this.t, row,"op",agent); diff --git a/src/messenger/webim/js/brws.js b/src/messenger/webim/js/brws.js index e0c37deb..3cf06026 100644 --- a/src/messenger/webim/js/brws.js +++ b/src/messenger/webim/js/brws.js @@ -1 +1 @@ -var myAgent="";var _j=0;var myRealAgent="";function mk(){var nk=["\157\u0070e\u0072\u0061","msi\u0065","s\u0061\u0066\141\u0072\151","\u0066iref\157\u0078","\156et\u0073\143\141p\145","m\u006fz\u0069\u006cla"];var hj=navigator.userAgent.toLowerCase();for(var i=0;i';} ,ri:function(ds,si){ds.deleteRow(si+2);ds.deleteRow(si+1);ds.deleteRow(si);} ,ti:function(ds,si){var ui=ds.insertRow(si);var ws=ui.insertCell(-1);ws.colSpan=(8+5);ws.height=2;ui=ds.insertRow(si);ws=ui.insertCell(-1);ws.colSpan=(9+4);ws.style.backgroundColor='\u0023\1051E1\1051';ws.innerHTML=''+ji+'<\u002f\141\076';} ,li:function(content){return'\u003c\u0074able\u0020\u0077\u0069d\u0074\150\u003d"\061\u0030\u0030\045"\u0020c\u0065ll\u0073\160\141ci\u006eg="\060"\040c\145l\154pad\u0064i\u006e\u0067\075"\060"\040b\u006f\u0072\144\u0065r="\060"\076<\u0074r\u003e'+content+'\u003c/tr><\057t\u0061\142\u006c\u0065>';} ,oi:function(pi,di,id,ei,fi,gi,at){var ai=2;var link=di+"\u003fth\u0072ead="+id;var bi='',01130,(295+125),null);bi+='\074\u002f\u0074d\u003e';ai++;} return ni.li(bi);} } ;sq.ci=mn.nn();mn.sn(sq.ci,sq.lq,{qn:function(pq){this.oq(pq);this.pq.mi=this.mi.on(this);this.pq.uu=this.uu.on(this);this.pq.tu=this.tu.on(this);this.pq.vi=0;this.wi=new Object();this.xi=0;this.t=this.pq.yi;this.zi=new sq._h(this.pq);} ,mi:function(){return"\143\157\u006dp\u0061\u006e\u0079\u003d"+this.pq.company+"\046\u0073\u0069n\u0063\145="+this.pq.vi;} ,yt:function(iu){this.pq.status.innerHTML=iu;} ,uu:function(s){this.yt(s);} ,$i:function(mh){var id,_i,mj,ei=false,fi=false,gi=null;for(var i=0;i=lj.rowIndex)){ni.ri(this.t,ui.rowIndex+1);this.t.deleteRow(ui.rowIndex);this.wi[id]=null;ui=null;} if(ui==null){ui=this.t.insertRow(kj.rowIndex+1);ni.ti(this.t,kj.rowIndex+2);ui.id="\164h\162"+id;this.wi[id]=new Array(uj,ij,_i);ls.insertCell(ui,"\156ame","\164ab\154\u0065",null,(23+7),ni.oi(sj,this.pq.agentservl,id,ei,fi,gi,at));ni.qi(ui);ls.insertCell(ui,"\u0063\u006fnt\151d","\u0074a\142l\u0065","ce\156t\145\162",null,tj);ni.qi(ui);ls.insertCell(ui,"s\164\141t\145","t\u0061b\154\145","c\u0065n\164\145r",null,mj);ni.qi(ui);ls.insertCell(ui,"\157p","\164\141\u0062l\145","\143\145n\164\u0065r",null,hj);ni.qi(ui);ls.insertCell(ui,"t\151me","\u0074ab\154\u0065","\u0063\145n\164\145\u0072",null,this.oj(uj));ni.qi(ui);ls.insertCell(ui,"\u0077\u0061i\164","\u0074abl\145","center",null,(_i!='\u0063h\141t'?this.oj(ij):'\u002d'));ni.qi(ui);ls.insertCell(ui,"\u0065tc","\u0074\141\u0062\u006ce","\u0063\145\156t\145r",null,jj);if(_i=='wait'||_i=='p\u0072\151\u006f')return true;} else{this.wi[id]=new Array(uj,ij,_i);qj(this.t,ui,"nam\145",ni.oi(sj,this.pq.agentservl,id,ei,fi,gi,at));qj(this.t,ui,"\143\u006f\156t\u0069\144",tj);qj(this.t,ui,"sta\164\u0065",mj);qj(this.t,ui,"\u006fp",hj);qj(this.t,ui,"\u0074ime",this.oj(uj));qj(this.t,ui,"wa\151\164",(_i!='\u0063\150\141t'?this.oj(ij):'-'));qj(this.t,ui,"\145\164\143",jj);} return false;} ,pj:function(){function dj(t,id,ej){var kj=t.rows[id];var lj=t.rows[id+"e\156\u0064"];if(kj==null||lj==null)return;var fj=lj.cells["st\141\164\165\u0073"];if(fj==null)return;fj.innerHTML=(kj.rowIndex+1==lj.rowIndex)?ej:"";fj.height=(kj.rowIndex+1==lj.rowIndex)?(29+1):012;} dj(this.t,"\167\u0061it",this.pq.noclients);dj(this.t,"\u0070r\151\u006f",this.pq.noclients);dj(this.t,"\u0063\150\141\u0074",this.pq.noclients);} ,oj:function(gj){var aj=Math.floor(((new Date()).getTime()-gj-this.xi)/01750);var bj=Math.floor(aj/074);var cj="";aj=aj%0x3c;if(aj<(9+1))aj="\060"+aj;if(bj>=074){var vj=Math.floor(bj/0x3c);bj=bj%074;if(bj<(8+2))bj="\060"+bj;cj=vj+"\u003a";} return cj+bj+"\072"+aj;} ,wj:function(){for(var i in this.wi){if(this.wi[i]!=null){var value=this.wi[i];var ui=ls.os("\u0074\150\u0072"+i,this.t);if(ui!=null){function qj(ds,ui,id,rj){var ws=ls.fs(id,ui,ds);if(ws)ws.innerHTML=rj;} qj(this.t,ui,"ti\155e",this.oj(value[0]));qj(this.t,ui,"w\u0061\u0069\164",(value[2]!='\143\150\141t'?this.oj(value[1]):'-'));} } } } ,tu:function(xj){var yj=false;if(xj.tagName=='\164hre\u0061ds'){var zj=qs.ks(xj,"t\151m\145");var $j=qs.ks(xj,"\u0072evisi\u006f\u006e");if(zj)this.xi=(new Date()).getTime()-zj;if($j)this.pq.vi=$j;for(var i=0;i';} ,ri:function(ds,si){ds.deleteRow(si+2);ds.deleteRow(si+1);ds.deleteRow(si);} ,ti:function(ds,si){var ui=ds.insertRow(si);var ws=ui.insertCell(-1);ws.colSpan=(8+5);ws.height=2;ui=ds.insertRow(si);ws=ui.insertCell(-1);ws.colSpan=(9+4);ws.style.backgroundColor='\u0023\1051E1\1051';ws.innerHTML=''+ji+'<\u002f\141\076';} ,li:function(content){return'\u003c\u0074able\u0020\u0077\u0069d\u0074\150\u003d"\061\u0030\u0030\045"\u0020c\u0065ll\u0073\160\141ci\u006eg="\060"\040c\145l\154pad\u0064i\u006e\u0067\075"\060"\040b\u006f\u0072\144\u0065r="\060"\076<\u0074r\u003e'+content+'\u003c/tr><\057t\u0061\142\u006c\u0065>';} ,oi:function(pi,di,id,ei,fi,gi,at,ai){var bi=2;var link=di+"\u003fth\u0072ead="+id;var ci='\u003c\151\155g\u0020\163r\u0063\075"'+st+'/\151ma\147es/f\162\u0065\145.gif" \167\151\u0064\164h\u003d"5" \150\145\u0069\u0067\150t="1" b\u006f\162d\145r\075"\060" a\u006c\u0074\u003d"">\u003c\057\164d>';if(fi){ci+='\u003c\164\144 \167idt\u0068="\u0033\060"\u0020alig\u006e\075"ce\u006e\164er"\u003e';ci+=ni.hi(link,localized[0],"\111m\u0043\145\156ter"+id,'';kj=ni.li(kj);var lj=ls.os(mj,this.t);var oj=ls.os(mj+"\u0065\156d",this.t);if(ui!=null&&(ui.rowIndex<=lj.rowIndex||ui.rowIndex>=oj.rowIndex)){ni.ri(this.t,ui.rowIndex+1);this.t.deleteRow(ui.rowIndex);this.xi[id]=null;ui=null;} if(ui==null){ui=this.t.insertRow(lj.rowIndex+1);ni.ti(this.t,lj.rowIndex+2);ui.id="t\150\u0072"+id;this.xi[id]=new Array(hj,jj,mj);ls.insertCell(ui,"\156\u0061\155\u0065","ta\u0062l\145",null,036,ni.oi(tj,this.pq.agentservl,id,ei,fi,gi,at,mj!='c\u0068\141\164'));ni.qi(ui);ls.insertCell(ui,"\u0063\u006fn\u0074i\u0064","t\u0061b\u006c\u0065","c\u0065\u006et\u0065r",null,uj);ni.qi(ui);ls.insertCell(ui,"s\164at\145","\164\u0061ble","c\145\156t\145r",null,nj);ni.qi(ui);ls.insertCell(ui,"\157p","t\u0061bl\145","ce\156\u0074\145r",null,ij);ni.qi(ui);ls.insertCell(ui,"ti\u006d\u0065","\164a\u0062l\145","\u0063\145nt\u0065\162",null,this.pj(hj));ni.qi(ui);ls.insertCell(ui,"\u0077a\151\u0074","\u0074\u0061b\154\u0065","c\145\u006e\164\145r",null,(mj!='c\u0068\u0061\u0074'?this.pj(jj):'\u002d'));ni.qi(ui);ls.insertCell(ui,"\u0065tc","\u0074a\142\u006ce","\143en\u0074e\162",null,kj);if(mj=='\167\u0061\u0069t'||mj=='\u0070\u0072\u0069o')return true;} else{this.xi[id]=new Array(hj,jj,mj);rj(this.t,ui,"\156\141me",ni.oi(tj,this.pq.agentservl,id,ei,fi,gi,at,mj!='ch\u0061t'));rj(this.t,ui,"\u0063\157\u006e\164\u0069\144",uj);rj(this.t,ui,"sta\u0074\u0065",nj);rj(this.t,ui,"\u006f\u0070",ij);rj(this.t,ui,"t\u0069\u006de",this.pj(hj));rj(this.t,ui,"\u0077\u0061\u0069\164",(mj!='c\150a\u0074'?this.pj(jj):'\u002d'));rj(this.t,ui,"\145tc",kj);} return false;} ,dj:function(){function ej(t,id,fj){var lj=t.rows[id];var oj=t.rows[id+"\u0065\156\u0064"];if(lj==null||oj==null)return;var gj=oj.cells["\u0073t\u0061\164u\u0073"];if(gj==null)return;gj.innerHTML=(lj.rowIndex+1==oj.rowIndex)?fj:"";gj.height=(lj.rowIndex+1==oj.rowIndex)?(25+5):(9+1);} ej(this.t,"w\u0061\u0069t",this.pq.noclients);ej(this.t,"p\u0072\151\157",this.pq.noclients);ej(this.t,"\143\150\u0061t",this.pq.noclients);} ,pj:function(aj){var bj=Math.floor(((new Date()).getTime()-aj-this.yi)/01750);var cj=Math.floor(bj/074);var vj="";bj=bj%074;if(bj<012)bj="0"+bj;if(cj>=074){var wj=Math.floor(cj/074);cj=cj%(50+10);if(cj<(8+2))cj="\060"+cj;vj=wj+":";} return vj+cj+":"+bj;} ,xj:function(){for(var i in this.xi){if(this.xi[i]!=null){var value=this.xi[i];var ui=ls.os("\u0074\150\162"+i,this.t);if(ui!=null){function rj(ds,ui,id,sj){var ws=ls.fs(id,ui,ds);if(ws)ws.innerHTML=sj;} rj(this.t,ui,"\164im\u0065",this.pj(value[0]));rj(this.t,ui,"\u0077a\151\u0074",(value[2]!='\u0063\u0068a\u0074'?this.pj(value[1]):'\055'));} } } } ,tu:function(yj){var zj=false;if(yj.tagName=='t\150\162\u0065\u0061\144s'){var $j=qs.ks(yj,"t\u0069m\u0065");var _j=qs.ks(yj,"\u0072e\u0076\u0069\163\u0069\u006f\u006e");if($j)this.yi=(new Date()).getTime()-$j;if(_j)this.pq.wi=_j;for(var i=0;i