回复 2# bill
/*无流程做待办任务**/
function noneFlowPadding(sql,fieldNames,width,height){
var fileName = "jcpt";
var w = "100%";
var h = "100%";
if(width) w = width;
if(height) h = height;
var datas = queryBySQL(sql);
var temp = "";
var value = "";
var count = 1;
var tempvalue="";
if (datas.size() > 0) {
for ( var it = datas.iterator(); it.hasNext();) {
var doc = it.next();
if(fieldNames.constructor==Array){
count=fieldNames.length;
tempvalue="";
for(var i=0;i<count;i++){
tempvalue+=doc.getItemValueAsString(fieldNames)+" "; }
}else{
tempvalue=doc.getItemValueAsString(fieldNames);
}
temp += '<tr>'
+'<td id="pd" onMouseOver="this.className=\'over\'" onMouseOut="this.className=\'out\'" style="margin-top:2px;">'
+'<img src="/'+fileName+'/resource/img/unRd.gif" alt="未读" name="isUnRdImg"/>'
+'<a style="width:85%" href="javaScript:viewDoc(\''
+ doc.getId()
+ '\',\''
+ doc.getFormid()
+ '\','
//+ null
+false
+ ')">'
+ tempvalue
+ '   </a></td></tr>';
}
}
value = '<div class=\'ElementDiv\' border=\'0\' style=\'padding:5px;background-color:white;height='+h+'; width='+w+';overflow:auto\' >'
+'<div class="context"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="">'
+ temp
+'</table>'
+'</div><div align="left">'
+'</div>';
value += '<script type="text/javascript">'
+'function viewDoc(docid, formid,reminderid) {'
+'if (docid && formid) {'
+'var viewDocURL = "/'+fileName+'/portal/dynaform/document/view.action?application='+getApplication()+'&_currpage=1&_rowcount=1&_pagelines=10&_backURL=%2F'+fileName+'%2Fportal%2Fdispatch%2Fhomepage.jsp?application='+getApplication()+'";'
+'viewDocURL += "&_docid=" + docid;'
+'viewDocURL += "&_formid=" + formid;'
+'viewDocURL += "&reminderid=" + reminderid;'
+'window.location.href = viewDocURL;'
+'}'
+'}'
+'</script></div>';
return value;
} |