dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30232
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15332: minor
------------------------------------------------------------
revno: 15332
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-05-21 12:05:20 +0200
message:
minor
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/dataentry.html
--
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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-05-20 15:56:10 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-05-21 10:05:20 +0000
@@ -745,25 +745,26 @@
if(event){
- $scope.currentEvent = event;
+ $scope.currentEvent = event;
+ $scope.currentEvent.providedElsewhere = [];
$scope.currentEvent.dataValues = [];
$scope.currentStage = storage.get($scope.currentEvent.programStage);
angular.forEach($scope.currentStage.programStageDataElements, function(prStDe){
$scope.currentStage.programStageDataElements[prStDe.dataElement.id] = prStDe.dataElement;
- //$scope.currentEvent.dataValues.push({value: '', dataElement: prStDe.dataElement.id, providedElsewhere: ''});
+ if(prStDe.allowProvidedElsewhere){
+ $scope.currentEvent.providedElsewhere[prStDe.dataElement.id] = '';
+ }
});
angular.forEach($scope.currentEvent.dataValues, function(dataValue){
var val = dataValue.value;
var de = $scope.currentStage.programStageDataElements[dataValue.dataElement];
- if( de && de.type == 'int' && val){
+ if( de && de.type === 'int' && val){
val = parseInt(val);
dataValue.value = val;
- }
-
- //$scope.currentEvent[dataValue.dataElement] = val;
- });
+ }
+ });
}
};
})
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/dataentry.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/dataentry.html 2014-05-20 15:56:10 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/dataentry.html 2014-05-21 10:05:20 +0000
@@ -89,7 +89,7 @@
</td>
<td>
<span ng-if="prStDe.allowProvidedElsewhere">
- <input type="checkbox" ng-model="currentEvent[prStDe.dataElement.id].providedElsewhere"/>
+ <input type="checkbox" ng-model="currentEvent.providedElsewhere[prStDe.dataElement.id]"/>
</span>
</td>
</tr>