Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/dms
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3903/dms
Modified Files:
documentReport.jsp
Log Message:
bug fixed (add a javascriptEscape to doc. name )
Index: documentReport.jsp
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/dms/documentReport.jsp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** documentReport.jsp 20 Jul 2004 14:54:52 -0000 1.8
--- documentReport.jsp 22 Mar 2005 00:55:17 -0000 1.9
***************
*** 10,18 ****
<%@ page import="java.math.*, java.util.*, java.io.*, java.sql.*, oscar.*, oscar.util.*, java.net.*,oscar.MyDateFormat" %>
<%@ include file="../admin/dbconnection.jsp" %>
! <jsp:useBean id="apptMainBean" class="oscar.AppointmentMainBean" scope="session" />
<%@ include file="dbDMS.jsp" %>
<%
! String nowDate = UtilDateUtilities.DateToString(UtilDateUtilities.now(), "yyyy/MM/dd HH:mm:ss");
String function = request.getParameter("function");
String functionid = request.getParameter("functionid");
--- 10,19 ----
<%@ page import="java.math.*, java.util.*, java.io.*, java.sql.*, oscar.*, oscar.util.*, java.net.*,oscar.MyDateFormat" %>
+ <%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%@ include file="../admin/dbconnection.jsp" %>
! <jsp:useBean id="apptMainBean" class="oscar.AppointmentMainBean" scope="session" />
<%@ include file="dbDMS.jsp" %>
<%
! String nowDate = UtilDateUtilities.DateToString(UtilDateUtilities.now(), "yyyy/MM/dd HH:mm:ss");
String function = request.getParameter("function");
String functionid = request.getParameter("functionid");
***************
*** 24,56 ****
String functionString = getFullName(apptMainBean, function, functionid);
!
! //String functionString = function.substring(0,1).toUpperCase()+function.substring(1);
%>
! <!--
/*
! *
* Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *
! * This software is published under the GPL GNU General Public License.
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version. *
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
! * along with this program; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
! *
* <OSCAR TEAM>
! *
! * This software was written for the
! * Department of Family Medicine
! * McMaster Unviersity
! * Hamilton
! * Ontario, Canada
*/
-->
! <html:html locale="true">
<head>
<title><bean:message key="dms.documentReport.title"/></title>
--- 25,57 ----
String functionString = getFullName(apptMainBean, function, functionid);
!
! //String functionString = function.substring(0,1).toUpperCase()+function.substring(1);
%>
! <!--
/*
! *
* Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *
! * This software is published under the GPL GNU General Public License.
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version. *
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
! * along with this program; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
! *
* <OSCAR TEAM>
! *
! * This software was written for the
! * Department of Family Medicine
! * McMaster Unviersity
! * Hamilton
! * Ontario, Canada
*/
-->
! <html:html locale="true">
<head>
<title><bean:message key="dms.documentReport.title"/></title>
***************
*** 103,119 ****
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<tr bgcolor="#486ebd">
! <th align='LEFT'><input type='button' name='print' value='<bean:message key="global.btnPrint"/>' onClick='window.print()'></th>
<th align='RIGHT' ><font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><bean:message key="dms.documentReport.msgDocReport"/> </font></th>
<th align='RIGHT'><input type="button" name="Button" value="<bean:message key="dms.documentReport.btnAddHTML"/>" onclick="window.open('../dms/addhtmldocument.jsp?function=<%=function%>&functionid=<%=functionid%>&creator=<%=request.getParameter("curUser")%>','', 'scrollbars=yes,resizable=yes,width=600,height=600')";><input type="button" name="Button" value="<bean:message key="dms.documentReport.btnAddDoc"/>" onclick="window.open('../dms/adddocument.jsp?function=<%=function%>&functionid=<%=functionid%>&creator=<%=request.getParameter("curUser")%>','', 'scrollbars=yes,resizable=yes,width=600,height=300')";><input type='button' name='close' value='<bean:message key="global.btnClose"/>' onClick='window.close()'></th>
</tr>
</table>
!
!
<table BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="100%" BGCOLOR="#C4D9E7">
! <tr valign="top">
! <td rowspan="2" ALIGN="center" valign="middle">
!
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td colspan='5'><b><%=functionString%>'s folder</b></td></td>
--- 104,120 ----
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<tr bgcolor="#486ebd">
! <th align='LEFT'><input type='button' name='print' value='<bean:message key="global.btnPrint"/>' onClick='window.print()'></th>
<th align='RIGHT' ><font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><bean:message key="dms.documentReport.msgDocReport"/> </font></th>
<th align='RIGHT'><input type="button" name="Button" value="<bean:message key="dms.documentReport.btnAddHTML"/>" onclick="window.open('../dms/addhtmldocument.jsp?function=<%=function%>&functionid=<%=functionid%>&creator=<%=request.getParameter("curUser")%>','', 'scrollbars=yes,resizable=yes,width=600,height=600')";><input type="button" name="Button" value="<bean:message key="dms.documentReport.btnAddDoc"/>" onclick="window.open('../dms/adddocument.jsp?function=<%=function%>&functionid=<%=functionid%>&creator=<%=request.getParameter("curUser")%>','', 'scrollbars=yes,resizable=yes,width=600,height=300')";><input type='button' name='close' value='<bean:message key="global.btnClose"/>' onClick='window.close()'></th>
</tr>
</table>
!
!
<table BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="100%" BGCOLOR="#C4D9E7">
! <tr valign="top">
! <td rowspan="2" ALIGN="center" valign="middle">
!
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td colspan='5'><b><%=functionString%>'s folder</b></td></td>
***************
*** 121,131 ****
<td width="34%"><b><bean:message key="dms.documentReport.msgDocDesc"/></b></td>
<td width="15%"><b><bean:message key="dms.documentReport.msgDocType"/></b></td>
! <td width="17%"><b><bean:message key="dms.documentReport.msgCreator"/></b></td>
! <td width="21%"><b><bean:message key="dms.documentReport.msgUpdate" /></b></td>
<td width="13%"><b><bean:message key="dms.documentReport.msgAction" /></b></td>
</tr>
!
<%
!
int count0 = 0;
if(request.getParameter("creator") != null) creator= request.getParameter("creator") ;
--- 122,132 ----
<td width="34%"><b><bean:message key="dms.documentReport.msgDocDesc"/></b></td>
<td width="15%"><b><bean:message key="dms.documentReport.msgDocType"/></b></td>
! <td width="17%"><b><bean:message key="dms.documentReport.msgCreator"/></b></td>
! <td width="21%"><b><bean:message key="dms.documentReport.msgUpdate" /></b></td>
<td width="13%"><b><bean:message key="dms.documentReport.msgAction" /></b></td>
</tr>
!
<%
!
int count0 = 0;
if(request.getParameter("creator") != null) creator= request.getParameter("creator") ;
***************
*** 133,137 ****
if(request.getParameter("doctype") != null) doctype= request.getParameter("doctype") ;
if(request.getParameter("docdesc") != null) docdesc= request.getParameter("docdesc") ;
!
String[] param0 = new String[3];
--- 134,138 ----
if(request.getParameter("doctype") != null) doctype= request.getParameter("doctype") ;
if(request.getParameter("docdesc") != null) docdesc= request.getParameter("docdesc") ;
!
String[] param0 = new String[3];
***************
*** 139,144 ****
param0[1] = functionid;
param0[2] = "%"; // doctype;
!
!
ResultSet rslocal2 = null;
rslocal2 = apptMainBean.queryResults(param0, "match_document");
--- 140,145 ----
param0[1] = functionid;
param0[2] = "%"; // doctype;
!
!
ResultSet rslocal2 = null;
rslocal2 = apptMainBean.queryResults(param0, "match_document");
***************
*** 152,171 ****
dispStatus = rslocal2.getString("status");
count0 = count0 + 1;
!
if (dispStatus.compareTo("A") == 0) dispStatus="active";
! if (dispStatus.compareTo("H") == 0) dispStatus="html";
// if (function.compareTo("demographic") == 0){
!
!
String creatorName = getFullName(apptMainBean,"provider",dispCreator);
// }
%>
<tr>
! <td width="34%"><a href=# onClick="javascript:rs('new','documentGetFile.jsp?document=<%=dispFilename%>&type=<%=dispStatus%>&doc_no=<%=dispDocNo%>', 480,480,1)"><%=dispDesc%></td>
<td width="15%"><%=dispType%></td>
<td width="17%"><%=creatorName%></td>
<td width="21%"><%=dispUpdatedate%></td>
<td width="13%"><a href=# onClick="checkDelete('documentDelete.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&functionid=<%=functionid%>','<%=dispCreator%>','<%=curUser_no%>','<%=userlastname%>')"><bean:message key="dms.documentReport.btnDelete"/></a> <a href=# onClick="popPage('documentEdit.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&doctype=<%=URLEncoder.encode(dispType)%>&desc=<%=URLEncoder.encode(dispDesc)%>')"><bean:message key="dms.documentReport.btnEdit"/></a></td>
! </tr>
<% }
--- 153,172 ----
dispStatus = rslocal2.getString("status");
count0 = count0 + 1;
!
if (dispStatus.compareTo("A") == 0) dispStatus="active";
! if (dispStatus.compareTo("H") == 0) dispStatus="html";
// if (function.compareTo("demographic") == 0){
!
!
String creatorName = getFullName(apptMainBean,"provider",dispCreator);
// }
%>
<tr>
! <td width="34%"><a href=# onClick="javascript:rs('new','documentGetFile.jsp?document=<%=StringEscapeUtils.escapeJavaScript(dispFilename)%>&type=<%=dispStatus%>&doc_no=<%=dispDocNo%>', 480,480,1)"><%=dispDesc%></td>
<td width="15%"><%=dispType%></td>
<td width="17%"><%=creatorName%></td>
<td width="21%"><%=dispUpdatedate%></td>
<td width="13%"><a href=# onClick="checkDelete('documentDelete.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&functionid=<%=functionid%>','<%=dispCreator%>','<%=curUser_no%>','<%=userlastname%>')"><bean:message key="dms.documentReport.btnDelete"/></a> <a href=# onClick="popPage('documentEdit.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&doctype=<%=URLEncoder.encode(dispType)%>&desc=<%=URLEncoder.encode(dispDesc)%>')"><bean:message key="dms.documentReport.btnEdit"/></a></td>
! </tr>
<% }
***************
*** 180,186 ****
<%if (function.compareTo("provider") == 0){ %>
<table BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="100%" BGCOLOR="#C4E9E7">
! <tr valign="top">
! <td rowspan="2" ALIGN="center" valign="middle">
! <table width="100%" border="1" cellspacing="0" cellpadding="0" >
<tr><td colspan='5'><b><bean:message key="dms.documentReport.msgShareFolder"/></b></td></tr>
<tr>
--- 181,187 ----
<%if (function.compareTo("provider") == 0){ %>
<table BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="100%" BGCOLOR="#C4E9E7">
! <tr valign="top">
! <td rowspan="2" ALIGN="center" valign="middle">
! <table width="100%" border="1" cellspacing="0" cellpadding="0" >
<tr><td colspan='5'><b><bean:message key="dms.documentReport.msgShareFolder"/></b></td></tr>
<tr>
***************
*** 188,192 ****
<td width="15%"><b><bean:message key="dms.documentReport.msgDocType"/></b></td>
<td width="17%"><b><%=function.substring(0,1).toUpperCase()%><%=function.substring(1)%></b></td>
! <td width="21%"><b><bean:message key="dms.documentReport.msgUpdate"/></b></td>
<td width="13%"><b><bean:message key="dms.documentReport.msgActive"/></b></td>
</tr>
--- 189,193 ----
<td width="15%"><b><bean:message key="dms.documentReport.msgDocType"/></b></td>
<td width="17%"><b><%=function.substring(0,1).toUpperCase()%><%=function.substring(1)%></b></td>
! <td width="21%"><b><bean:message key="dms.documentReport.msgUpdate"/></b></td>
<td width="13%"><b><bean:message key="dms.documentReport.msgActive"/></b></td>
</tr>
***************
*** 196,201 ****
String[] param1 = new String[1];
param1[0] = function;
!
!
rslocal2 = null;
rslocal2 = apptMainBean.queryResults(param1, "share_document");
--- 197,202 ----
String[] param1 = new String[1];
param1[0] = function;
!
!
rslocal2 = null;
rslocal2 = apptMainBean.queryResults(param1, "share_document");
***************
*** 209,243 ****
dispStatus = rslocal2.getString("status");
count = count + 1;
!
if (dispStatus.compareTo("A") == 0) dispStatus="active";
! if (dispStatus.compareTo("H") == 0) dispStatus="html";
!
ResultSet rslocal = null;
! rslocal = apptMainBean.queryResults(dispCreator, "search_"+function+"_details");
! while(rslocal.next()){
proFirst = rslocal.getString("first_name");
proLast = rslocal.getString("last_name");
// proOHIP = rslocal.getString("provider_no");
}
!
%>
<tr>
! <td width="34%"><a href=# onClick="javascript:rs('new','documentGetFile.jsp?document=<%=dispFilename%>&type=<%=dispStatus%>&doc_no=<%=dispDocNo%>', 480,480,1)"><%=dispDesc%></td>
<td width="15%"><%=dispType%></td>
<td width="17%"><%=proLast%>, <%=proFirst%></td>
<td width="21%"><%=dispUpdatedate%></td>
<td width="13%"><a href=# onClick="checkDelete('documentDelete.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&functionid=<%=functionid%>','<%=dispCreator%>','<%=curUser_no%>', '<%=userlastname%>')"><bean:message key="dms.documentReport.btnDelete"/></a> <a href=# onClick="popPage('documentEdit.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&doctype=<%=URLEncoder.encode(dispType)%>&desc=<%=URLEncoder.encode(dispDesc)%>')"><bean:message key="dms.documentReport.btnEdit"/></a> </td>
! </tr>
!
<% }
if (count == 0) { %>
!
<tr><td colspan='5'><bean:message key="dms.documentReport.msgNoMatch"/></td></td>
! <% }%>
</table>
</td>
</tr>
</table>
! <%}
apptMainBean.closePstmtConn(); %>
--- 210,244 ----
dispStatus = rslocal2.getString("status");
count = count + 1;
!
if (dispStatus.compareTo("A") == 0) dispStatus="active";
! if (dispStatus.compareTo("H") == 0) dispStatus="html";
!
ResultSet rslocal = null;
! rslocal = apptMainBean.queryResults(dispCreator, "search_"+function+"_details");
! while(rslocal.next()){
proFirst = rslocal.getString("first_name");
proLast = rslocal.getString("last_name");
// proOHIP = rslocal.getString("provider_no");
}
!
%>
<tr>
! <td width="34%"><a href=# onClick="javascript:rs('new','documentGetFile.jsp?document=<%=StringEscapeUtils.escapeJavaScript(dispFilename)%>&type=<%=dispStatus%>&doc_no=<%=dispDocNo%>', 480,480,1)"><%=dispDesc%></td>
<td width="15%"><%=dispType%></td>
<td width="17%"><%=proLast%>, <%=proFirst%></td>
<td width="21%"><%=dispUpdatedate%></td>
<td width="13%"><a href=# onClick="checkDelete('documentDelete.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&functionid=<%=functionid%>','<%=dispCreator%>','<%=curUser_no%>', '<%=userlastname%>')"><bean:message key="dms.documentReport.btnDelete"/></a> <a href=# onClick="popPage('documentEdit.jsp?document_no=<%=dispDocNo%>&function=<%=function%>&doctype=<%=URLEncoder.encode(dispType)%>&desc=<%=URLEncoder.encode(dispDesc)%>')"><bean:message key="dms.documentReport.btnEdit"/></a> </td>
! </tr>
!
<% }
if (count == 0) { %>
!
<tr><td colspan='5'><bean:message key="dms.documentReport.msgNoMatch"/></td></td>
! <% }%>
</table>
</td>
</tr>
</table>
! <%}
apptMainBean.closePstmtConn(); %>
***************
*** 251,260 ****
public String getFullName(oscar.AppointmentMainBean apptMainBean, String function, String functionid) throws Exception{
! ResultSet rslocal = apptMainBean.queryResults(functionid, "search_"+function+"_details");
String proFirst = "";
String proLast = "";
! if(rslocal.next()){
proFirst = rslocal.getString("first_name");
! proLast = rslocal.getString("last_name");
}
return proLast+", "+proFirst ;
--- 252,261 ----
public String getFullName(oscar.AppointmentMainBean apptMainBean, String function, String functionid) throws Exception{
! ResultSet rslocal = apptMainBean.queryResults(functionid, "search_"+function+"_details");
String proFirst = "";
String proLast = "";
! if(rslocal.next()){
proFirst = rslocal.getString("first_name");
! proLast = rslocal.getString("last_name");
}
return proLast+", "+proFirst ;
|