dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32019
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16350: changes to options reflected in event capture
------------------------------------------------------------
revno: 16350
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-08 13:18:55 +0200
message:
changes to options reflected in event capture
modified:
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.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-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-07-09 09:33:55 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-08-08 11:18:55 +0000
@@ -394,7 +394,7 @@
{
return function() {
return $.ajax( {
- url: '../api/optionSets.json?filter=id:eq:' + id +'&fields=id,name,version,options',
+ url: '../api/optionSets.json?filter=id:eq:' + id +'&fields=id,name,version,options[id,name,code]',
type: 'GET'
}).done( function( response ){
_.each( _.values( response.optionSets ), function( optionSet ) {
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-07-06 12:46:18 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-08-08 11:18:55 +0000
@@ -241,7 +241,7 @@
this.getAttributesAsString(attributes) +
' ng-model="currentEvent.' + deId + '" ' +
' ng-required="programStageDataElements.' + deId + '.compulsory"' +
- ' typeahead="option for option in programStageDataElements.'+deId+'.dataElement.optionSet.options | filter:$viewValue | limitTo:20"' +
+ ' typeahead="option.code as option.name for option in programStageDataElements.'+deId+'.dataElement.optionSet.options | filter:$viewValue | limitTo:20"' +
' typeahead-open-on-focus ng-required="programStageDataElements.'+deId+'.compulsory">';
}
if(programStageDataElements[deId].dataElement.type == "bool"){
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-08-01 12:22:15 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-08-08 11:18:55 +0000
@@ -75,7 +75,7 @@
<div class="container-fluid">
<input type="text"
ng-model="currentEvent[eventGridColumn.id]"
- typeahead="option for option in programStageDataElements[eventGridColumn.id].dataElement.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead="option.code as option.name for option in programStageDataElements[eventGridColumn.id].dataElement.optionSet.options | filter:$viewValue | limitTo:20"
typeahead-open-on-focus
ng-required={{eventGridColumn.compulsory}}
name="foo"