dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32077
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16393: minor
------------------------------------------------------------
revno: 16393
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-13 10:20:00 +0200
message:
minor
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-07-25 09:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-08-13 08:20:00 +0000
@@ -244,9 +244,13 @@
return {
require: ['typeahead', 'ngModel'],
link: function (scope, element, attr, ctrls) {
- element.bind('focus', function () {
- ctrls[0].getMatchesAsync(ctrls[1].$viewValue);
- //scope.$apply();
+ element.bind('focus', function () {
+ ctrls[0].getMatchesAsync(ctrls[1].$viewValue);
+ scope.$watch(attr.ngModel, function(value) {
+ if(value === '' || angular.isUndefined(value)){
+ ctrls[0].getMatchesAsync(ctrls[1].$viewValue);
+ }
+ });
});
}
};
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-08-12 14:48:01 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-08-13 08:20:00 +0000
@@ -434,7 +434,7 @@
});
angular.forEach(program.programTrackedEntityAttributes, function(pAttribute){
- var att = attributes[pAttribute.attribute.id];
+ var att = attributes[pAttribute.trackedEntityAttribute.id];
att.mandatory = pAttribute.mandatory;
if(pAttribute.displayInList){
att.displayInListNoProgram = true;
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-08-08 14:59:22 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-08-13 08:20:00 +0000
@@ -307,7 +307,7 @@
$.ajax({
url: '../api/programs.json',
type: 'GET',
- data:'type=1&userFilter=true&paging=false&fields=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,attribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+ data:'type=1&userFilter=true&paging=false&fields=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,trackedEntityAttribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
}).done( function(response) {
var programs = [];
_.each( _.values( response.programs ), function ( program ) {
@@ -377,7 +377,7 @@
return $.ajax( {
url: '../api/programs.json',
type: 'GET',
- data: 'paging=false&filter=id:eq:' + id +'&fields=id,name,version,relationshipText,relationshipFromA,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,realionshipText,trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],programStages[id,name,version,minDaysFromStart,reportDateDescription,repeatable,autoGenerateEvent],programTrackedEntityAttributes[displayInList,mandatory,attribute[id]]'
+ data: 'paging=false&filter=id:eq:' + id +'&fields=id,name,version,relationshipText,relationshipFromA,dateOfEnrollmentDescription,dateOfIncidentDescription,displayIncidentDate,ignoreOverdueEvents,realionshipText,trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],programStages[id,name,version,minDaysFromStart,reportDateDescription,repeatable,autoGenerateEvent],programTrackedEntityAttributes[displayInList,mandatory,trackedEntityAttribute[id]]'
}).done( function( response ){
_.each( _.values( response.programs ), function ( program ) {