view thread button

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@135 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-10-02 09:53:49 +00:00
parent ece8ab9c3c
commit 1f49aef13b
3 changed files with 14 additions and 7 deletions

View File

@ -95,11 +95,11 @@ var HtmlGenerationUtils = {
return '<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr>' + content + '</tr></table>';
},
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 = '<td class="table" style="padding-left:0px; padding-right:0px;">';
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 += '</td><td><img src="'+webimRoot+'/images/free.gif" width="5" height="1" border="0" alt=""></td>';
if( canopen ) {
gen += '<td width="30" align="center">';
@ -107,7 +107,12 @@ var HtmlGenerationUtils = {
gen += '</td>';
cellsCount++;
}
if( canview ) {
gen += '<td width="30" align="center">';
gen += HtmlGenerationUtils.popupLink( link+"&viewonly=true", localized[1], "ImCenter"+id, '<img src="'+webimRoot+'/images/tbliclread.gif" width="15" height="15" border="0" alt="'+localized[1]+'">', 600, 420, null);
gen += '</td>';
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);

View File

@ -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<nk.length;i++){var qk=nk[i];if(hj.indexOf(qk)!=-1){myAgent=qk;if(!window.RegExp)break;var rk=new RegExp(qk+"[\040\/]?\u0028[0\0559\u005d\u002b\050\.\u005b\u0030\055\u0039\135+)\077\u0029");if(rk.exec(hj)!=null){_j=parseFloat(RegExp.$1);} break;} } myRealAgent=myAgent;if(navigator.product=="\107\145\u0063k\u006f")myAgent="\u006do\u007a";} mk();function getEl(name){return document.getElementById(name);}
var myAgent="";var mk=0;var myRealAgent="";function nk(){var qk=["\157p\u0065\u0072\u0061","\u006d\u0073\u0069e","\163\141f\141ri","fi\u0072\u0065f\157\170","\156\145\164\u0073\u0063\141p\u0065","\u006d\157\172\u0069\u006c\154a"];var ij=navigator.userAgent.toLowerCase();for(var i=0;i<qk.length;i++){var rk=qk[i];if(ij.indexOf(rk)!=-1){myAgent=rk;if(!window.RegExp)break;var sk=new RegExp(rk+"\u005b \/\135\u003f\u0028\133\u0030-\u0039]+\050\.[\u0030-\071\u005d+\051\077)");if(sk.exec(ij)!=null){mk=parseFloat(RegExp.$1);} break;} } myRealAgent=myAgent;if(navigator.product=="Ge\143k\157")myAgent="m\157z";} nk();function getEl(name){return document.getElementById(name);}

File diff suppressed because one or more lines are too long