Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/oscarEncounter/oscarConsultationRequest
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv2596
Modified Files:
Tag: RELEASE_10_12
ConsultationFormRequest.jsp
Log Message:
- ID: 3160248 Restored buttons to top of consult and changed how javascript
cycles through specialist objects when populating list box
Index: ConsultationFormRequest.jsp
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/oscarEncounter/oscarConsultationRequest/ConsultationFormRequest.jsp,v
retrieving revision 1.71
retrieving revision 1.71.2.1
diff -C2 -d -r1.71 -r1.71.2.1
*** ConsultationFormRequest.jsp 29 Nov 2010 19:42:16 -0000 1.71
--- ConsultationFormRequest.jsp 18 Jan 2011 14:35:01 -0000 1.71.2.1
***************
*** 208,212 ****
<script language="JavaScript" type="text/javascript">
! var servicesName = new Array(); // used as a cross reference table for name and number
var services = new Array(); // the following are used as a 2D table for makes and models
var specialists = new Array();
--- 208,212 ----
<script language="JavaScript" type="text/javascript">
! var servicesName = new Object(); // used as a cross reference table for name and number
var services = new Array(); // the following are used as a 2D table for makes and models
var specialists = new Array();
***************
*** 227,231 ****
function K( serviceNumber, service ){
! servicesName[service] = new ServicesName(serviceNumber);
services[serviceNumber] = new Service( );
}
--- 227,232 ----
function K( serviceNumber, service ){
! //servicesName[service] = new ServicesName(serviceNumber);
! servicesName[service] = serviceNumber;
services[serviceNumber] = new Service( );
}
***************
*** 446,450 ****
var strSer = new String(ser);
! for (aIdx in servicesName){
var serNBR = servicesName[aIdx].serviceNumber;
document.EctConsultationFormRequestForm.service.options[ i ] = new Option( aIdx, serNBR );
--- 447,463 ----
var strSer = new String(ser);
! $H(servicesName).each(function(pair){
! var opt = document.createElement("option");
! opt.textContent = pair.key;
! opt.value = pair.value;
! if( pair.value == strSer ) {
! opt.selected = true;
! fillSpecialistSelect1( pair.value );
! }
! $("service").options.add(opt);
!
! });
!
! /* for (aIdx in servicesName){
var serNBR = servicesName[aIdx].serviceNumber;
document.EctConsultationFormRequestForm.service.options[ i ] = new Option( aIdx, serNBR );
***************
*** 460,465 ****
}
i++;
}
- }
//-------------------------------------------------------------------
--- 473,478 ----
}
i++;
+ }*/
}
//-------------------------------------------------------------------
***************
*** 529,532 ****
--- 542,550 ----
button=form.submitAndSendElectronically;
if (button!=null) button.disabled=disabled;
+
+ var button=form.updateAndSendElectronicallyTop;
+ if (button!=null) button.disabled=disabled;
+ button=form.submitAndSendElectronicallyTop;
+ if (button!=null) button.disabled=disabled;
}
***************
*** 584,587 ****
--- 602,606 ----
return false;
}
+ $("saved").value = "true";
document.forms[formName].submission.value=submissionVal;
document.forms[formName].submit();
***************
*** 746,749 ****
--- 765,775 ----
}
+ function checksave() {
+ var saved = $F("saved");
+ if( saved == "false" ) {
+ return "You are about to close the consult WITHOUT saving. Are you sure you want to exit?";
+ }
+ }
+ window.onbeforeunload = checksave;
</script>
<%=WebUtils.popErrorMessagesAsAlert(session)%>
***************
*** 808,811 ****
--- 834,838 ----
<input type="hidden" name="requestId" value="<%=requestId%>">
<input type="hidden" name="documents" value="">
+ <input type="hidden" id="saved" value="false">
<!-- -->
<table class="MainTable" id="scrollNumber1" name="encounterTable">
***************
*** 942,945 ****
--- 969,1017 ----
<!----Start new rows here-->
<tr>
+ <td class="tite4" colspan=2>
+ <%
+ if (request.getAttribute("id") != null)
+ {
+ %>
+ <input name="update" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnUpdate"/>" onclick="return checkForm('Update Consultation Request','EctConsultationFormRequestForm');" />
+ <input name="updateAndPrint" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnUpdateAndPrint"/>" onclick="return checkForm('Update Consultation Request And Print Preview','EctConsultationFormRequestForm');" />
+ <input name="updateAndSendElectronicallyTop" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnUpdateAndSendElectronicReferral"/>" onclick="return checkForm('Update_esend','EctConsultationFormRequestForm');" />
+ <%
+ if (props.getProperty("faxEnable", "").equalsIgnoreCase("yes"))
+ {
+ %>
+ <input name="updateAndFax" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnUpdateAndFax"/>" onclick="return checkForm('Update And Fax','EctConsultationFormRequestForm');" />
+ <%
+ }
+ %>
+ <%
+ }
+ else
+ {
+ %>
+ <input name="submitSaveOnly" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnSubmit"/>" onclick="return checkForm('Submit Consultation Request','EctConsultationFormRequestForm'); " />
+ <input name="submitAndPrint" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnSubmitAndPrint"/>" onclick="return checkForm('Submit Consultation Request And Print Preview','EctConsultationFormRequestForm'); " />
+ <input name="submitAndSendElectronicallyTop" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnSubmitAndSendElectronicReferral"/>" onclick="return checkForm('Submit_esend','EctConsultationFormRequestForm');" />
+ <%
+ if (props.getProperty("faxEnable", "").equalsIgnoreCase("yes"))
+ {
+ %>
+ <input name="submitAndFax" type="button" value="<bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.btnSubmitAndFax"/>" onclick="return checkForm('Submit And Fax','EctConsultationFormRequestForm');" />
+ <%
+ }
+ %>
+ <%
+ }
+
+ if (thisForm.iseReferral())
+ {
+ %>
+ <input type="button" value="Send eResponse" onclick="$('saved').value='true';document.location='<%=thisForm.getOruR01UrlString(request)%>'" />
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr>
<td>
***************
*** 965,969 ****
</td>
<td align="right" class="tite1">
! <html:select property="service" onchange="fillSpecialistSelect(this);">
<!-- <option value="-1">------ <bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.formServSelect"/> ------</option>
<option/>
--- 1037,1041 ----
</td>
<td align="right" class="tite1">
! <html:select styleId="service" property="service" onchange="fillSpecialistSelect(this);">
<!-- <option value="-1">------ <bean:message key="oscarEncounter.oscarConsultationRequest.ConsultationFormRequest.formServSelect"/> ------</option>
<option/>
***************
*** 1412,1416 ****
{
%>
! <input type="button" value="Send eResponse" onclick="document.location='<%=thisForm.getOruR01UrlString(request)%>'" />
<%
}
--- 1484,1488 ----
{
%>
! <input type="button" value="Send eResponse" onclick="$('saved').value='true';document.location='<%=thisForm.getOruR01UrlString(request)%>'" />
<%
}
|