dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41848
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21362: Included the profile in the print feature
------------------------------------------------------------
revno: 21362
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-12-07 16:51:15 +0100
message:
Included the profile in the print feature
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-12-07 14:57:49 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-12-07 15:51:15 +0000
@@ -99,12 +99,9 @@
$scope.printDiv = function( divName ) {
var elements = document.getElementsByClassName(divName);
- var printContents = "";
- for (var index = 0; index < elements.length; index++) {
- printContents += elements[index].innerHTML;
- }
+ var printContents = elements[3].innerHTML + elements[0].innerHTML + elements[1].innerHTML + elements[2].innerHTML;
var popupWin = window.open('', '_blank', 'width=800,height=800');
- popupWin.document.open();
+ //popupWin.document.open();
popupWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="style.css" /></head><body onload="window.print()">' + printContents + '</html>');
popupWin.document.close();
}