diff --git a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp index 565d87152112fc753e5a96d452b46c14b03207c3..3630fd440ab093e5575b496224e7a90f676453a8 100644 --- a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp +++ b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp @@ -41,6 +41,7 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, ""); return ((a[1] < b[1]) ? 1 : ((a[1] > b[1]) ? -1 : 0)); }; </script> + <script type="text/javascript"> $(document).ready(function() { $("#patientList").dataTable( { @@ -62,18 +63,22 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, ""); <script type="text/javascript"> - function showRisks(){ ///////////////////////////////////// for BUTTONS DEACTIVE, Should HIDE ROW. - //document.getElementById("risks").style.display="inline"; - //document.getElementById("riskButton").style.display="none"; + var editButtonId = ""; + + function showButton(){ ///////////////////////////////////// for BUTTONS DEACTIVE, Should HIDE ROW. + //document.getElementById("editButton").style.display="inline"; + + document.getElementById(editButtonId).style.display="none"; return; } + </script> - + + <thead> <tr class=""> - <th>Approve</th> <th>Deactivate</th> <th>Name</th> <th>Address</th> @@ -88,35 +93,49 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, ""); for (PatientBean bean : PreRegisteredPatientList) { ////////// ???????????????????? Change PatientVisitBean to PatientBean patientsList.add(bean); + String idName = "row" + index; + String editButtonName = "button" + index; %> - <tr> - <td> - <a href="editPatient.jsp" style="text-decoration: none;"> - <input type=button value="Activate" onclick="javascript:showRisks();"> - </a> - </td> + + <script type="text/javascript"> + + row_id = "<%=idName%>"; + + function hideRow(rowId){ ///////////////////////////////////// for BUTTONS DEACTIVE, Should HIDE ROW. + //document.getElementById("editButton").style.display="inline"; + //rowId = "<%=idName%>"; + document.getElementById(rowId).style.display="none"; + return; + } + + editButtonId = "<%=editButtonName%>"; + + </script> + + <tr id=<%=idName%>> <td> - <a href="editPatient.jsp" style="text-decoration: none;"> - <input type=button value="DeActivate" onclick="javascript:showRisks();"> + <a style="text-decoration: none;"> + <input type=button value="DeActivate" onclick="javascript:hideRow(row_id);"> </a> </td> <td > - <a href="viewPreRegisteredPatientInfo.jsp?patient=<%= StringEscapeUtils.escapeHtml("" + (index)) %>"> + <a href="viewPreRegisteredPatientInfo.jsp?patient=<%= StringEscapeUtils.escapeHtml("" + (index)) %>" id=<%=editButtonName%>> <%= StringEscapeUtils.escapeHtml("" + (bean.getFullName())) %> </a> - </td> - <td ><%= StringEscapeUtils.escapeHtml("" + (bean.getStreetAddress1() +" " +bean.getStreetAddress2() +" " +bean.getStreetAddress3())) %></td> + </td> + <td ><%= StringEscapeUtils.escapeHtml("" + (bean.getStreetAddress1() +" " +bean.getStreetAddress2() +" " +bean.getCity() +" " +bean.getState()) +" " +bean.getZip()) %></td> <td > <%= StringEscapeUtils.escapeHtml("" + (bean.getEmail())) %> </td> </tr> <% index ++; + } session.setAttribute("patients", patientsList); //////////////////// ??????????????????????????????????????????