← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16896: tracker capture - star icon for (un)marking followups; support for free text entry

 

------------------------------------------------------------
revno: 16896
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 11:56:40 +0200
message:
  tracker capture - star icon for (un)marking followups; support for free text entry
modified:
  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/default-form.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json


--
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.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2014-09-17 14:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2014-10-01 09:56:40 +0000
@@ -20,7 +20,7 @@
                 <tbody>
                     <tr>
                         <td class="inline-block" ng-repeat="dhis2Event in dhis2Events| orderBy:'sortingDate':reverse">
-                            <span class="block align-center">{{dhis2Event.orgUnitName}}</span>                                              
+                            <span class="block align-center">{{dhis2Event.eventOrgUnitName}}</span>                                              
                             <span class="stage-container"                                                     
                                   ng-class="{'current-stage': currentEvent && currentEvent.event == dhis2Event.event, '{{dhis2Event.statusColor}}': true}"                                                      
                                   ng-click="showDataEntry(dhis2Event)">
@@ -41,7 +41,7 @@
                 <tbody>
                     <tr>
                         <td class="inline-block" ng-repeat="dummyEvent in dummyEvents| orderBy:'sortingDate':reverse">
-                            <span class="block align-center">{{dhis2Event.orgUnitName}}</span>                                              
+                            <span class="block align-center">{{dhis2Event.eventOrgUnitName}}</span>                                              
                             <span class="stage-container"                                                     
                                   ng-class="{'current-stage': currentDummyEvent && currentDummyEvent.programStage == dummyEvent.programStage, '{{dummyEvent.statusColor}}': true}"                                                      
                                   ng-click="showDummyEventCreation(dummyEvent)">

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2014-09-07 08:30:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2014-10-01 09:56:40 +0000
@@ -30,7 +30,8 @@
                             <span ng-show="dataEntryOuterForm.submitted && dataEntryInnerForm.foo.$invalid" class="error">{{'number_required'| translate}}</span>
                         </div>
                         <div ng-switch-when="string">    
-                            <input type="text"
+                            <span ng-if="prStDe.dataElement.optionSet">
+                                <input type="text"
                                    ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
                                    ng-model="currentEvent[prStDe.dataElement.id]" 
                                    ng-required={{prStDe.compulsory}} 
@@ -38,6 +39,15 @@
                                    typeahead-open-on-focus    
                                    ng-blur="saveDatavalue(prStDe)" 
                                    name="foo"/>
+                            </span>
+                            <span ng-if="!prStDe.dataElement.optionSet">
+                                <input type="text"
+                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   ng-model="currentEvent[prStDe.dataElement.id]" 
+                                   ng-required={{prStDe.compulsory}}
+                                   ng-blur="saveDatavalue(prStDe)" 
+                                   name="foo"/>
+                            </span>                            
                         </div>
                         <div ng-switch-when="bool">
                             <select ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js	2014-09-18 14:53:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js	2014-10-01 09:56:40 +0000
@@ -293,6 +293,7 @@
     };
     
     $scope.markForFollowup = function(){
+        $scope.selectedEnrollment.followup = !$scope.selectedEnrollment.followup; 
         EnrollmentService.update($scope.selectedEnrollment).then(function(data){         
         });
     };

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html	2014-09-18 14:07:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html	2014-10-01 09:56:40 +0000
@@ -47,17 +47,25 @@
                     {{'complete'| translate}}
                 </button>
                 <button type="button" 
-                        class="btn btn-danger"
+                        class="btn btn-warning"
                         ng-click="terminateEnrollment()">
                     {{'terminate'| translate}}
-                </button>
-   
-
-                <span class='small-horizonal-spacing'>
-                    <label>
-                        {{'mark_for_followup' | translate}}  <input type="checkbox" ng-change="markForFollowup()" ng-model="selectedEnrollment.followup"/>
-                    </label>
-                </span>  
+                </button>   
+                
+                <button type="button"
+                        title="{{'unmark_for_followup' | translate}}"
+                        class="btn btn-danger horizonal-spacing"
+                        ng-if="selectedEnrollment.followup"
+                        ng-click="markForFollowup()">
+                    <i class="fa fa-star"></i>
+                </button>
+                <button type="button" 
+                        title="{{'mark_for_followup' | translate}}"
+                        class="btn btn-default horizonal-spacing"
+                        ng-if="!selectedEnrollment.followup"
+                        ng-click="markForFollowup()">
+                    <i class="fa fa-star"></i>
+                </button>
                 
             </div>
         </div>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2014-09-08 09:08:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js	2014-10-01 09:56:40 +0000
@@ -30,8 +30,7 @@
     
     $scope.showAddRelationship = function() {
         $rootScope.showAddRelationshipDiv = !$rootScope.showAddRelationshipDiv;
-        
-        console.log('It is me relationship:  ', $rootScope.showAddRelationshipDiv);
+       
         if($rootScope.showAddRelationshipDiv){
             var modalInstance = $modal.open({
                 templateUrl: 'components/relationship/add-relationship.html',
@@ -319,6 +318,7 @@
     
     $scope.assignRelationship = function(relativeTei){
         $scope.teiForRelationship = relativeTei;
+        $rootScope.showAddRelationshipDiv = !$rootScope.showAddRelationshipDiv;
     };
     
     $scope.addRelationship = function(){

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json	2014-09-11 12:35:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json	2014-10-01 09:56:40 +0000
@@ -133,6 +133,7 @@
     "_report": "report",     
     "visit_schedule": "Visit Schedule",
     "mark_for_followup": "Mark for followup",
+    "unmark_for_followup": "Remove from followup",
     "only_marked_for_followup": "Only marked for followup",
     "registered_data": "Registered data",
     "no_data_found": "No data found",