← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21391: Added profile into the print form

 

------------------------------------------------------------
revno: 21391
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-12-09 15:58:14 +0100
message:
  Added profile into the print form
modified:
  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.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css


--
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-08 12:40:25 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-12-09 14:58:14 +0000
@@ -99,7 +99,8 @@
 
     $scope.print = function(divName){
         $scope.showProgramReportDetailsDiv = false;
-        var printContents = document.getElementById(divName).innerHTML;
+        var elements =  document.getElementsByClassName(divName);
+        var printContents =  elements[1].innerHTML + elements[0].innerHTML;
         var popupWin = window.open('', '_blank', 'fullscreen=1');
         popupWin.document.open();
         popupWin.document.write('<html>\n\

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2015-12-09 13:25:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2015-12-09 14:58:14 +0000
@@ -1,4 +1,4 @@
-<div id='printSection' class="panel panel-info" ng-controller="DataEntryController">
+<div class="panel panel-info print-section" ng-controller="DataEntryController">
 
     <table class="table-borderless table-striped not-for-screen">
         <tr class="col-md-12">
@@ -211,7 +211,7 @@
                     <a href ng-click="deleteEvent()" 
                        ng-disabled="currentEvent.enrollmentStatus === 'COMPLETED' || currentEvent.editingNotAllowed || currentEvent.orgUnit !== selectedOrgUnit.id"
                        class="btn btn-danger">{{'delete'| translate}}</a>
-                    <a href class="btn btn-primary" ng-click="print('printSection');">{{'print_form'| translate}}</a>
+                    <a href class="btn btn-primary" ng-click="print('print-section');">{{'print_form'| translate}}</a>
                 </div>
                 <!-- data entry/event buttons ends -->
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html	2015-12-08 12:53:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html	2015-12-09 14:58:14 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-info" ng-controller="ProfileController">
+<div class="panel panel-info print-section" ng-controller="ProfileController">
     <div class="panel-heading handle bold">
         {{profileWidget.title| translate}}
         <span class="nav-pills" ng-if="!enrollmentEditing && !selectedTei.inactive">

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css	2015-12-09 13:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css	2015-12-09 14:58:14 +0000
@@ -16,6 +16,10 @@
     }
 }
 
+.print-section {
+    display: block;
+}
+
 h1 {    
     font-size: 1.8em;
 }