Skip to content

Commit

Permalink
Fix open of CCD in new window
Browse files Browse the repository at this point in the history
  • Loading branch information
pgesek committed May 23, 2018
1 parent ed07d8c commit 89fc589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions omod/src/main/webapp/fragments/summary/continuityOfCare.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
<button type="button" class="confirm" onclick="viewCCD(${ config.patientId })">
${ ui.message("registrationapp.continuityOfCare.document.view") }
</button>
<button class="submitButton right" onclick="importCCD(${ config.patientId })")>
<i class="icon-download"></i>
${ ui.message("registrationapp.continuityOfCare.document.import") }
</button>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -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('<title>Ccd document</title>' + ccdContent);
x.document.close();
newWindow.document.write('<title>Ccd document</title>' + ccdContent);
newWindow.document.close();
}
);
}
Expand Down

0 comments on commit 89fc589

Please sign in to comment.