From 89fc5890420b4a746b2771d9255b87713cac7056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gesek?= Date: Wed, 23 May 2018 20:36:01 +0200 Subject: [PATCH] Fix open of CCD in new window --- .../main/webapp/fragments/summary/continuityOfCare.gsp | 4 ---- .../webapp/resources/scripts/summary/continuityOfCare.js | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp b/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp index 321885c2..e741833f 100644 --- a/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp +++ b/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp @@ -22,10 +22,6 @@ - diff --git a/omod/src/main/webapp/resources/scripts/summary/continuityOfCare.js b/omod/src/main/webapp/resources/scripts/summary/continuityOfCare.js index 2282e7c9..f92a0897 100644 --- a/omod/src/main/webapp/resources/scripts/summary/continuityOfCare.js +++ b/omod/src/main/webapp/resources/scripts/summary/continuityOfCare.js @@ -1,11 +1,11 @@ function viewCCD(patientId) { - jq.getJSON( + var newWindow = window.open(); + jq.getJSON( '/' + OPENMRS_CONTEXT_PATH + '/registrationapp/summary/continuityOfCare/viewCCD.action', {patientId: patientId}, function(ccdContent) { - var x = window.open(); - x.document.write('Ccd document' + ccdContent); - x.document.close(); + newWindow.document.write('Ccd document' + ccdContent); + newWindow.document.close(); } ); }